- Timestamp:
- Feb 15, 2007, 9:24:34 PM (18 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 398699a
- Parents:
- 8efd1d3
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/vim-7.0-fixes-23.patch
r8efd1d3 ra64a245 1 1 Submitted By: Jim Gifford (jim at linuxfromscratch dot org) 2 Date: 0 1-23-20072 Date: 02-15-2007 3 3 Initial Package Version: 7.0 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 7.0.1 886 Description: Contains all upstream patches up to 7.0.195 7 7 The following patches were skipped 8 8 005 027 028 032 045 057 065 074 108 130 131 132 138 156 161 170 171 180 … … 10 10 diff -Naur vim70.orig/configure vim70/configure 11 11 --- vim70.orig/configure 2004-07-05 02:02:24.000000000 -0700 12 +++ vim70/configure 2007-0 1-23 17:14:51.000000000 -080012 +++ vim70/configure 2007-02-15 21:22:24.000000000 -0800 13 13 @@ -3,4 +3,4 @@ 14 14 # This is just a stub for the Unix configure script, to provide support for … … 19 19 diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim 20 20 --- vim70.orig/runtime/autoload/ccomplete.vim 2006-05-03 07:35:56.000000000 -0700 21 +++ vim70/runtime/autoload/ccomplete.vim 2007-0 1-23 17:14:45.000000000 -080021 +++ vim70/runtime/autoload/ccomplete.vim 2007-02-15 21:22:24.000000000 -0800 22 22 @@ -1,7 +1,7 @@ 23 23 " Vim completion script … … 40 40 diff -Naur vim70.orig/runtime/autoload/gzip.vim vim70/runtime/autoload/gzip.vim 41 41 --- vim70.orig/runtime/autoload/gzip.vim 2006-03-31 07:12:15.000000000 -0800 42 +++ vim70/runtime/autoload/gzip.vim 2007-0 1-23 17:15:02.000000000 -080042 +++ vim70/runtime/autoload/gzip.vim 2007-02-15 21:22:25.000000000 -0800 43 43 @@ -1,6 +1,6 @@ 44 44 " Vim autoload file for editing compressed files. … … 101 101 diff -Naur vim70.orig/runtime/autoload/paste.vim vim70/runtime/autoload/paste.vim 102 102 --- vim70.orig/runtime/autoload/paste.vim 2006-04-21 11:31:01.000000000 -0700 103 +++ vim70/runtime/autoload/paste.vim 2007-0 1-23 17:14:49.000000000 -0800103 +++ vim70/runtime/autoload/paste.vim 2007-02-15 21:22:24.000000000 -0800 104 104 @@ -1,6 +1,6 @@ 105 105 " Vim support file to help with paste mappings and menus … … 121 121 diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim 122 122 --- vim70.orig/runtime/autoload/spellfile.vim 2006-02-01 04:12:24.000000000 -0800 123 +++ vim70/runtime/autoload/spellfile.vim 2007-0 1-23 17:14:56.000000000 -0800123 +++ vim70/runtime/autoload/spellfile.vim 2007-02-15 21:22:25.000000000 -0800 124 124 @@ -1,9 +1,9 @@ 125 125 " Vim script to download a missing spell file … … 177 177 diff -Naur vim70.orig/runtime/doc/autocmd.txt vim70/runtime/doc/autocmd.txt 178 178 --- vim70.orig/runtime/doc/autocmd.txt 2006-05-07 05:16:44.000000000 -0700 179 +++ vim70/runtime/doc/autocmd.txt 2007-0 1-23 17:15:23.000000000 -0800179 +++ vim70/runtime/doc/autocmd.txt 2007-02-15 21:22:27.000000000 -0800 180 180 @@ -1,4 +1,4 @@ 181 181 -*autocmd.txt* For Vim version 7.0. Last change: 2006 May 06 … … 239 239 diff -Naur vim70.orig/runtime/doc/eval.txt vim70/runtime/doc/eval.txt 240 240 --- vim70.orig/runtime/doc/eval.txt 2006-05-07 05:16:44.000000000 -0700 241 +++ vim70/runtime/doc/eval.txt 2007-0 1-23 17:15:09.000000000 -0800241 +++ vim70/runtime/doc/eval.txt 2007-02-15 21:22:27.000000000 -0800 242 242 @@ -1,4 +1,4 @@ 243 243 -*eval.txt* For Vim version 7.0. Last change: 2006 May 06 … … 295 295 user that a character has to be typed. 296 296 There is no mapping for the character. 297 @@ -4434,6 +4462,21 @@ 297 @@ -2869,12 +2897,14 @@ 298 vcol non-zero: "col" is visual column 299 zero: "col" is byte index 300 nr error number 301 + pattern search pattern used to locate the error 302 text description of the error 303 type type of the error, 'E', '1', etc. 304 valid non-zero: recognized error message 305 306 When there is no error list or it's empty an empty list is 307 - returned. 308 + returned. Quickfix list entries with non-existing buffer 309 + number are returned with "bufnr" set to zero. 310 311 Useful application: Find pattern matches in multiple files and 312 do something with them: > 313 @@ -4343,7 +4373,10 @@ 314 Non-dictionary items in {list} are ignored. Each dictionary 315 item can contain the following entries: 316 317 - filename name of a file 318 + bufnr buffer number; must be the number of a valid 319 + buffer 320 + filename name of a file; only used when "bufnr" is not 321 + present or it is invalid. 322 lnum line number in the file 323 pattern search pattern used to locate the error 324 col column number 325 @@ -4356,11 +4389,13 @@ 326 The "col", "vcol", "nr", "type" and "text" entries are 327 optional. Either "lnum" or "pattern" entry can be used to 328 locate a matching error line. 329 - If the "filename" entry is not present or neither the "lnum" 330 - or "pattern" entries are present, then the item will not be 331 - handled as an error line. 332 + If the "filename" and "bufnr" entries are not present or 333 + neither the "lnum" or "pattern" entries are present, then the 334 + item will not be handled as an error line. 335 If both "pattern" and "lnum" are present then "pattern" will 336 be used. 337 + Note that the list is not exactly the same as what 338 + |getqflist()| returns. 339 340 If {action} is set to 'a', then the items from {list} are 341 added to the existing quickfix list. If there is no existing 342 @@ -4434,6 +4469,21 @@ 298 343 :call setwinvar(1, "&list", 0) 299 344 :call setwinvar(2, "myvar", "foobar") … … 319 364 diff -Naur vim70.orig/runtime/doc/netbeans.txt vim70/runtime/doc/netbeans.txt 320 365 --- vim70.orig/runtime/doc/netbeans.txt 2006-05-07 05:16:45.000000000 -0700 321 +++ vim70/runtime/doc/netbeans.txt 2007-0 1-23 17:15:10.000000000 -0800366 +++ vim70/runtime/doc/netbeans.txt 2007-02-15 21:22:26.000000000 -0800 322 367 @@ -1,4 +1,4 @@ 323 368 -*netbeans.txt* For Vim version 7.0. Last change: 2006 Mar 09 … … 355 400 diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim 356 401 --- vim70.orig/runtime/menu.vim 2006-04-17 06:47:28.000000000 -0700 357 +++ vim70/runtime/menu.vim 2007-0 1-23 17:15:02.000000000 -0800402 +++ vim70/runtime/menu.vim 2007-02-15 21:22:25.000000000 -0800 358 403 @@ -2,7 +2,7 @@ 359 404 " You can also use this as a start for your own set of menus. … … 422 467 diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim 423 468 --- vim70.orig/runtime/plugin/matchparen.vim 2006-04-27 06:31:26.000000000 -0700 424 +++ vim70/runtime/plugin/matchparen.vim 2007-0 1-23 17:15:00.000000000 -0800469 +++ vim70/runtime/plugin/matchparen.vim 2007-02-15 21:22:25.000000000 -0800 425 470 @@ -1,6 +1,6 @@ 426 471 " Vim plugin for showing matching parens … … 465 510 diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim 466 511 --- vim70.orig/runtime/scripts.vim 2006-03-28 11:30:49.000000000 -0800 467 +++ vim70/runtime/scripts.vim 2007-0 1-23 17:14:51.000000000 -0800512 +++ vim70/runtime/scripts.vim 2007-02-15 21:22:24.000000000 -0800 468 513 @@ -1,7 +1,7 @@ 469 514 " Vim support file to detect file types in scripts … … 490 535 diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile 491 536 --- vim70.orig/runtime/tutor/Makefile 2004-06-07 07:32:39.000000000 -0700 492 +++ vim70/runtime/tutor/Makefile 2007-0 1-23 17:15:00.000000000 -0800537 +++ vim70/runtime/tutor/Makefile 2007-02-15 21:22:25.000000000 -0800 493 538 @@ -2,8 +2,13 @@ 494 539 # … … 524 569 diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8 525 570 --- vim70.orig/runtime/tutor/tutor.gr.utf-8 1969-12-31 16:00:00.000000000 -0800 526 +++ vim70/runtime/tutor/tutor.gr.utf-8 2007-0 1-23 17:15:00.000000000 -0800571 +++ vim70/runtime/tutor/tutor.gr.utf-8 2007-02-15 21:22:25.000000000 -0800 527 572 @@ -0,0 +1,815 @@ 528 573 +=============================================================================== … … 1557 1602 diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8 1558 1603 --- vim70.orig/runtime/tutor/tutor.ru.utf-8 1969-12-31 16:00:00.000000000 -0800 1559 +++ vim70/runtime/tutor/tutor.ru.utf-8 2007-0 1-23 17:14:56.000000000 -08001604 +++ vim70/runtime/tutor/tutor.ru.utf-8 2007-02-15 21:22:25.000000000 -0800 1560 1605 @@ -0,0 +1,834 @@ 1561 1606 +=============================================================================== … … 2478 2523 diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim 2479 2524 --- vim70.orig/runtime/tutor/tutor.vim 2006-03-18 12:20:36.000000000 -0800 2480 +++ vim70/runtime/tutor/tutor.vim 2007-0 1-23 17:15:00.000000000 -08002525 +++ vim70/runtime/tutor/tutor.vim 2007-02-15 21:22:25.000000000 -0800 2481 2526 @@ -1,6 +1,6 @@ 2482 2527 " Vim tutor support file … … 2528 2573 2529 2574 " Somehow ".ge" (Germany) is sometimes used for ".de" (Deutsch). 2575 diff -Naur vim70.orig/src/Makefile vim70/src/Makefile 2576 --- vim70.orig/src/Makefile 2006-05-07 06:25:27.000000000 -0700 2577 +++ vim70/src/Makefile 2007-02-15 21:22:25.000000000 -0800 2578 @@ -2177,6 +2177,7 @@ 2579 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . 2580 if test -d $(RSRC_DIR); then \ 2581 cd $(SHADOWDIR); \ 2582 + ln -s ../infplist.xml .; \ 2583 ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \ 2584 fi 2585 mkdir $(SHADOWDIR)/testdir 2586 @@ -2260,7 +2261,7 @@ 2587 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in 2588 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh 2589 2590 -QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/' 2591 +QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/' 2592 auto/pathdef.c: Makefile auto/config.mk 2593 -@echo creating $@ 2594 -@echo '/* pathdef.c */' > $@ 2530 2595 diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure 2531 2596 --- vim70.orig/src/auto/configure 2006-05-04 03:46:19.000000000 -0700 2532 +++ vim70/src/auto/configure 2007-0 1-23 17:15:06.000000000 -08002597 +++ vim70/src/auto/configure 2007-02-15 21:22:26.000000000 -0800 2533 2598 @@ -4014,7 +4014,7 @@ 2534 2599 LDFLAGS=$ldflags_save … … 2571 2636 diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c 2572 2637 --- vim70.orig/src/buffer.c 2006-04-26 14:37:23.000000000 -0700 2573 +++ vim70/src/buffer.c 2007-0 1-23 17:15:10.000000000 -08002638 +++ vim70/src/buffer.c 2007-02-15 21:22:26.000000000 -0800 2574 2639 @@ -434,12 +434,8 @@ 2575 2640 if (usingNetbeans) … … 2722 2787 diff -Naur vim70.orig/src/configure vim70/src/configure 2723 2788 --- vim70.orig/src/configure 2006-05-07 07:17:49.000000000 -0700 2724 +++ vim70/src/configure 2007-0 1-23 17:14:51.000000000 -08002789 +++ vim70/src/configure 2007-02-15 21:22:24.000000000 -0800 2725 2790 @@ -2,5 +2,9 @@ 2726 2791 # run the automatically generated configure script … … 2735 2800 diff -Naur vim70.orig/src/configure.in vim70/src/configure.in 2736 2801 --- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700 2737 +++ vim70/src/configure.in 2007-0 1-23 17:15:06.000000000 -08002802 +++ vim70/src/configure.in 2007-02-15 21:22:26.000000000 -0800 2738 2803 @@ -508,7 +508,8 @@ 2739 2804 LDFLAGS=$ldflags_save … … 2778 2843 diff -Naur vim70.orig/src/edit.c vim70/src/edit.c 2779 2844 --- vim70.orig/src/edit.c 2006-05-07 04:48:51.000000000 -0700 2780 +++ vim70/src/edit.c 2007-0 1-23 17:15:10.000000000 -08002845 +++ vim70/src/edit.c 2007-02-15 21:22:27.000000000 -0800 2781 2846 @@ -129,7 +129,7 @@ 2782 2847 … … 3327 3392 vim_free(compl_pattern); 3328 3393 compl_pattern = NULL; 3329 @@ -5227,8 +5336,16 @@ 3394 @@ -4861,16 +4970,18 @@ 3395 * just a safety check. */ 3396 if (compl_curr_match->cp_number != -1) 3397 { 3398 - /* Space for 10 text chars. + 2x10-digit no.s */ 3399 - static char_u match_ref[31]; 3400 + /* Space for 10 text chars. + 2x10-digit no.s = 31. 3401 + * Translations may need more than twice that. */ 3402 + static char_u match_ref[81]; 3403 3404 if (compl_matches > 0) 3405 - sprintf((char *)IObuff, _("match %d of %d"), 3406 + vim_snprintf((char *)match_ref, sizeof(match_ref), 3407 + _("match %d of %d"), 3408 compl_curr_match->cp_number, compl_matches); 3409 else 3410 - sprintf((char *)IObuff, _("match %d"), 3411 - compl_curr_match->cp_number); 3412 - vim_strncpy(match_ref, IObuff, 30); 3413 + vim_snprintf((char *)match_ref, sizeof(match_ref), 3414 + _("match %d"), 3415 + compl_curr_match->cp_number); 3416 edit_submode_extra = match_ref; 3417 edit_submode_highl = HLF_R; 3418 if (dollar_vcol) 3419 @@ -5227,8 +5338,16 @@ 3330 3420 /* Format with 'formatexpr' when it's set. Use internal formatting 3331 3421 * when 'formatexpr' isn't set or it returns non-zero. */ … … 3346 3436 internal_format(textwidth, second_indent, flags, c == NUL); 3347 3437 } 3348 @@ -8508,7 +862 5,12 @@3438 @@ -8508,7 +8627,12 @@ 3349 3439 tpos = curwin->w_cursor; 3350 3440 if (oneleft() == OK) … … 3360 3450 /* If exit reversed string, position is fixed */ 3361 3451 if (revins_scol != -1 && (int)curwin->w_cursor.col >= revins_scol) 3362 @@ -8700,7 +882 2,11 @@3452 @@ -8700,7 +8824,11 @@ 3363 3453 if (mod_mask & MOD_MASK_CTRL) 3364 3454 { … … 3373 3463 } 3374 3464 #endif 3375 @@ -8759,7 +888 5,11 @@3465 @@ -8759,7 +8887,11 @@ 3376 3466 if (mod_mask & MOD_MASK_CTRL) 3377 3467 { … … 3386 3476 } 3387 3477 #endif 3388 @@ -9074,6 +920 4,10 @@3478 @@ -9074,6 +9206,10 @@ 3389 3479 #ifdef FEAT_CINDENT 3390 3480 can_cindent = TRUE; … … 3399 3489 diff -Naur vim70.orig/src/eval.c vim70/src/eval.c 3400 3490 --- vim70.orig/src/eval.c 2006-05-05 10:15:26.000000000 -0700 3401 +++ vim70/src/eval.c 2007-0 1-23 17:15:12.000000000 -08003491 +++ vim70/src/eval.c 2007-02-15 21:22:27.000000000 -0800 3402 3492 @@ -166,7 +166,6 @@ 3403 3493 int uf_tm_count; /* nr of calls */ … … 4421 4511 smsg((char_u *)_("%s returning %s"), sourcing_name, buf); 4422 4512 vim_free(tofree); 4423 diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c4424 --- vim70.orig/src/ex_cmds2.c 2006-04-17 03:19:07.000000000 -07004425 +++ vim70/src/ex_cmds2.c 2007-01-23 17:15:23.000000000 -08004426 @@ -2811,6 +2811,17 @@4427 }4428 4429 #ifdef FEAT_AUTOCMD4430 + /* Apply SourceCmd autocommands, they should get the file and source it. */4431 + if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)4432 + && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,4433 + FALSE, curbuf))4434 +# ifdef FEAT_EVAL4435 + return aborting() ? FAIL : OK;4436 +# else4437 + return OK;4438 +# endif4439 +4440 + /* Apply SourcePre autocommands, they may get the file. */4441 apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);4442 #endif4443 4444 @@ -3648,13 +3659,13 @@4445 * Return FALSE when not sourcing a file.4446 */4447 int4448 -source_finished(getline, cookie)4449 - char_u *(*getline) __ARGS((int, void *, int));4450 +source_finished(fgetline, cookie)4451 + char_u *(*fgetline) __ARGS((int, void *, int));4452 void *cookie;4453 {4454 - return (getline_equal(getline, cookie, getsourceline)4455 + return (getline_equal(fgetline, cookie, getsourceline)4456 && ((struct source_cookie *)getline_cookie(4457 - getline, cookie))->finished);4458 + fgetline, cookie))->finished);4459 }4460 #endif4461 4462 4513 diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c 4463 4514 --- vim70.orig/src/ex_cmds.c 2006-04-22 11:56:56.000000000 -0700 4464 +++ vim70/src/ex_cmds.c 2007-0 1-23 17:14:59.000000000 -08004515 +++ vim70/src/ex_cmds.c 2007-02-15 21:22:27.000000000 -0800 4465 4516 @@ -95,7 +95,10 @@ 4466 4517 _("<%s>%s%s %d, Hex %02x, Octal %03o"), … … 4571 4622 #if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) 4572 4623 if (gui.in_use && curbuf->b_ffname != NULL) 4624 @@ -6960,6 +6967,14 @@ 4625 */ 4626 set_arglist(eap->arg); 4627 4628 + /* 4629 + * Expanding wildcards may result in an empty argument list. E.g. when 4630 + * editing "foo.pyc" and ".pyc" is in 'wildignore'. Assume that we 4631 + * already did an error message for this. 4632 + */ 4633 + if (ARGCOUNT == 0) 4634 + return; 4635 + 4636 # ifdef FEAT_WINDOWS 4637 if (cmdmod.tab) 4638 { 4573 4639 diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h 4574 4640 --- vim70.orig/src/ex_cmds.h 2006-04-07 02:44:46.000000000 -0700 4575 +++ vim70/src/ex_cmds.h 2007-0 1-23 17:14:49.000000000 -08004641 +++ vim70/src/ex_cmds.h 2007-02-15 21:22:24.000000000 -0800 4576 4642 @@ -262,7 +262,7 @@ 4577 4643 EX(CMD_comclear, "comclear", ex_comclear, … … 4583 4649 TRLBAR|SBOXOK|CMDWIN), 4584 4650 EX(CMD_confirm, "confirm", ex_wrongmodifier, 4651 diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c 4652 --- vim70.orig/src/ex_cmds2.c 2006-04-17 03:19:07.000000000 -0700 4653 +++ vim70/src/ex_cmds2.c 2007-02-15 21:22:27.000000000 -0800 4654 @@ -1242,14 +1242,22 @@ 4655 buf_T *buf; 4656 int forceit; 4657 { 4658 + int r; 4659 + 4660 if (!(p_aw || p_awa) || !p_write 4661 #ifdef FEAT_QUICKFIX 4662 - /* never autowrite a "nofile" or "nowrite" buffer */ 4663 - || bt_dontwrite(buf) 4664 + /* never autowrite a "nofile" or "nowrite" buffer */ 4665 + || bt_dontwrite(buf) 4666 #endif 4667 - || (!forceit && buf->b_p_ro) || buf->b_ffname == NULL) 4668 + || (!forceit && buf->b_p_ro) || buf->b_ffname == NULL) 4669 return FAIL; 4670 - return buf_write_all(buf, forceit); 4671 + r = buf_write_all(buf, forceit); 4672 + 4673 + /* Writing may succeed but the buffer still changed, e.g., when there is a 4674 + * conversion error. We do want to return FAIL then. */ 4675 + if (buf_valid(buf) && bufIsChanged(buf)) 4676 + r = FAIL; 4677 + return r; 4678 } 4679 4680 /* 4681 @@ -1472,6 +1480,8 @@ 4682 if (buf == NULL) /* No buffers changed */ 4683 return FALSE; 4684 4685 + /* Try auto-writing the buffer. If this fails but the buffer no 4686 + * longer exists it's not changed, that's OK. */ 4687 if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf)) 4688 break; /* didn't save - still changes */ 4689 } 4690 @@ -2811,6 +2821,17 @@ 4691 } 4692 4693 #ifdef FEAT_AUTOCMD 4694 + /* Apply SourceCmd autocommands, they should get the file and source it. */ 4695 + if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL) 4696 + && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp, 4697 + FALSE, curbuf)) 4698 +# ifdef FEAT_EVAL 4699 + return aborting() ? FAIL : OK; 4700 +# else 4701 + return OK; 4702 +# endif 4703 + 4704 + /* Apply SourcePre autocommands, they may get the file. */ 4705 apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); 4706 #endif 4707 4708 @@ -3648,13 +3669,13 @@ 4709 * Return FALSE when not sourcing a file. 4710 */ 4711 int 4712 -source_finished(getline, cookie) 4713 - char_u *(*getline) __ARGS((int, void *, int)); 4714 +source_finished(fgetline, cookie) 4715 + char_u *(*fgetline) __ARGS((int, void *, int)); 4716 void *cookie; 4717 { 4718 - return (getline_equal(getline, cookie, getsourceline) 4719 + return (getline_equal(fgetline, cookie, getsourceline) 4720 && ((struct source_cookie *)getline_cookie( 4721 - getline, cookie))->finished); 4722 + fgetline, cookie))->finished); 4723 } 4724 #endif 4725 4585 4726 diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c 4586 4727 --- vim70.orig/src/ex_docmd.c 2006-05-05 09:33:19.000000000 -0700 4587 +++ vim70/src/ex_docmd.c 2007-0 1-23 17:15:11.000000000 -08004728 +++ vim70/src/ex_docmd.c 2007-02-15 21:22:27.000000000 -0800 4588 4729 @@ -58,9 +58,9 @@ 4589 4730 #endif … … 5048 5189 diff -Naur vim70.orig/src/ex_eval.c vim70/src/ex_eval.c 5049 5190 --- vim70.orig/src/ex_eval.c 2006-04-22 12:22:27.000000000 -0700 5050 +++ vim70/src/ex_eval.c 2007-0 1-23 17:15:11.000000000 -08005191 +++ vim70/src/ex_eval.c 2007-02-15 21:22:26.000000000 -0800 5051 5192 @@ -340,7 +340,7 @@ 5052 5193 … … 5074 5215 diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c 5075 5216 --- vim70.orig/src/ex_getln.c 2006-04-30 08:32:01.000000000 -0700 5076 +++ vim70/src/ex_getln.c 2007-0 1-23 17:15:10.000000000 -08005217 +++ vim70/src/ex_getln.c 2007-02-15 21:22:26.000000000 -0800 5077 5218 @@ -34,7 +34,7 @@ 5078 5219 int xp_context; /* type of expansion */ … … 5224 5365 diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c 5225 5366 --- vim70.orig/src/fileio.c 2006-04-30 08:28:57.000000000 -0700 5226 +++ vim70/src/fileio.c 2007-0 1-23 17:15:23.000000000 -08005367 +++ vim70/src/fileio.c 2007-02-15 21:22:27.000000000 -0800 5227 5368 @@ -316,6 +316,9 @@ 5228 5369 * display the line. */ … … 5365 5506 diff -Naur vim70.orig/src/fold.c vim70/src/fold.c 5366 5507 --- vim70.orig/src/fold.c 2006-04-22 12:35:56.000000000 -0700 5367 +++ vim70/src/fold.c 2007-0 1-23 17:15:09.000000000 -08005508 +++ vim70/src/fold.c 2007-02-15 21:22:26.000000000 -0800 5368 5509 @@ -2971,7 +2971,11 @@ 5369 5510 else … … 5380 5521 diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c 5381 5522 --- vim70.orig/src/getchar.c 2006-05-03 10:29:21.000000000 -0700 5382 +++ vim70/src/getchar.c 2007-0 1-23 17:15:12.000000000 -08005523 +++ vim70/src/getchar.c 2007-02-15 21:22:27.000000000 -0800 5383 5524 @@ -76,7 +76,7 @@ 5384 5525 */ … … 5515 5656 diff -Naur vim70.orig/src/globals.h vim70/src/globals.h 5516 5657 --- vim70.orig/src/globals.h 2006-04-30 06:16:23.000000000 -0700 5517 +++ vim70/src/globals.h 2007-0 1-23 17:15:05.000000000 -08005658 +++ vim70/src/globals.h 2007-02-15 21:22:27.000000000 -0800 5518 5659 @@ -166,6 +166,7 @@ 5519 5660 EXTERN int emsg_off INIT(= 0); /* don't display errors for now, … … 5544 5685 5545 5686 #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) 5546 @@ -1441,7 +1449,7 @@ 5687 @@ -547,6 +555,10 @@ 5688 EXTERN buf_T *lastbuf INIT(= NULL); /* last buffer */ 5689 EXTERN buf_T *curbuf INIT(= NULL); /* currently active buffer */ 5690 5691 +/* Flag that is set when switching off 'swapfile'. It means that all blocks 5692 + * are to be loaded into memory. Shouldn't be global... */ 5693 +EXTERN int mf_dont_release INIT(= FALSE); /* don't release blocks */ 5694 + 5695 /* 5696 * List of files being edited (global argument list). curwin->w_alist points 5697 * to this when the window is using the global argument list. 5698 @@ -1441,7 +1453,7 @@ 5547 5699 EXTERN char_u e_readonly[] INIT(= N_("E45: 'readonly' option is set (add ! to override)")); 5548 5700 #ifdef FEAT_EVAL … … 5553 5705 #ifdef FEAT_QUICKFIX 5554 5706 EXTERN char_u e_readerrf[] INIT(= N_("E47: Error while reading errorfile")); 5555 diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c5556 --- vim70.orig/src/gui_at_fs.c 2005-07-09 04:30:17.000000000 -07005557 +++ vim70/src/gui_at_fs.c 2007-01-23 17:14:47.000000000 -08005558 @@ -1861,27 +1861,27 @@5559 XtPointer pnew;5560 {5561 SFDir *dir;5562 - int nw;5563 + int nw = (int)(long)pnew;5564 5565 dir = &(SFdirs[SFdirPtr + (int)(long)n]);5566 5567 #ifdef FEAT_GUI_NEXTAW5568 - if ((int)(long)pnew < 0)5569 + if (nw < 0)5570 {5571 - if ((int)(long)pnew > -SFvScrollHeight)5572 - (int)(long)pnew = -1;5573 + if (nw > -SFvScrollHeight)5574 + nw = -1;5575 else5576 - (int)(long)pnew = -SFlistSize;5577 + nw = -SFlistSize;5578 }5579 - else if ((int)(long)pnew > 0)5580 + else if (nw > 0)5581 {5582 - if ((int)(long)pnew < SFvScrollHeight)5583 - (int)(long)pnew = 1;5584 + if (nw < SFvScrollHeight)5585 + nw = 1;5586 else5587 - (int)(long)pnew = SFlistSize;5588 + nw = SFlistSize;5589 }5590 #endif5591 - nw = dir->vOrigin + (int)(long)pnew;5592 + nw += dir->vOrigin;5593 5594 if (nw > dir->nEntries - SFlistSize)5595 nw = dir->nEntries - SFlistSize;5596 @@ -1941,27 +1941,27 @@5597 XtPointer pnew;5598 {5599 SFDir *dir;5600 - int nw;5601 + int nw = (int)(long)pnew;5602 5603 dir = &(SFdirs[SFdirPtr + (int)(long)n]);5604 5605 #ifdef FEAT_GUI_NEXTAW5606 - if ((int)(long)pnew < 0)5607 + if (nw < 0)5608 {5609 - if ((int)(long)pnew > -SFhScrollWidth)5610 - (int)(long)pnew = -1;5611 + if (nw > -SFhScrollWidth)5612 + nw = -1;5613 else5614 - (int)(long)pnew = -SFcharsPerEntry;5615 + nw = -SFcharsPerEntry;5616 }5617 - else if ((int)(long)pnew > 0)5618 + else if (nw > 0)5619 {5620 - if ((int)(long)pnew < SFhScrollWidth)5621 - (int)(long)pnew = 1;5622 + if (nw < SFhScrollWidth)5623 + nw = 1;5624 else5625 - (int)(long)pnew = SFcharsPerEntry;5626 + nw = SFcharsPerEntry;5627 }5628 #endif5629 - nw = dir->hOrigin + (int)(long)pnew;5630 + nw += dir->hOrigin;5631 5632 if (nw > dir->nChars - SFcharsPerEntry)5633 nw = dir->nChars - SFcharsPerEntry;5634 @@ -2038,26 +2038,26 @@5635 XtPointer client_data;5636 XtPointer pnew;5637 {5638 - int nw;5639 + int nw = (int)(long)pnew;5640 float f;5641 5642 #ifdef FEAT_GUI_NEXTAW5643 - if ((int)(long)pnew < 0)5644 + if (nw < 0)5645 {5646 - if ((int)(long)pnew > -SFpathScrollWidth)5647 - (int)(long)pnew = -1;5648 + if (nw > -SFpathScrollWidth)5649 + nw = -1;5650 else5651 - (int)(long)pnew = -3;5652 + nw = -3;5653 }5654 - else if ((int)(long)pnew > 0)5655 + else if (nw > 0)5656 {5657 - if ((int)(long)pnew < SFpathScrollWidth)5658 - (int)(long)pnew = 1;5659 + if (nw < SFpathScrollWidth)5660 + nw = 1;5661 else5662 - (int)(long)pnew = 3;5663 + nw = 3;5664 }5665 #endif5666 - nw = SFdirPtr + (int)(long)pnew;5667 + nw += SFdirPtr;5668 5669 if (nw > SFdirEnd - 3)5670 nw = SFdirEnd - 3;5671 diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c5672 --- vim70.orig/src/gui_beval.c 2006-05-04 12:29:51.000000000 -07005673 +++ vim70/src/gui_beval.c 2007-01-23 17:14:55.000000000 -08005674 @@ -926,7 +926,7 @@5675 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \5676 || (c) == DEL)5677 static void5678 -set_printable_label_text(GtkLabel *label, char_u *msg)5679 +set_printable_label_text(GtkLabel *label, char_u *text)5680 {5681 char_u *convbuf = NULL;5682 char_u *buf;5683 @@ -940,14 +940,14 @@5684 /* Convert to UTF-8 if it isn't already */5685 if (output_conv.vc_type != CONV_NONE)5686 {5687 - convbuf = string_convert(&output_conv, msg, NULL);5688 + convbuf = string_convert(&output_conv, text, NULL);5689 if (convbuf != NULL)5690 - msg = convbuf;5691 + text = convbuf;5692 }5693 5694 /* First let's see how much we need to allocate */5695 len = 0;5696 - for (p = msg; *p != NUL; p += charlen)5697 + for (p = text; *p != NUL; p += charlen)5698 {5699 if ((*p & 0x80) == 0) /* be quick for ASCII */5700 {5701 @@ -992,7 +992,7 @@5702 (unsigned long)pixel, &color);5703 5704 pdest = buf;5705 - p = msg;5706 + p = text;5707 while (*p != NUL)5708 {5709 /* Be quick for ASCII */5710 5707 diff -Naur vim70.orig/src/gui.c vim70/src/gui.c 5711 5708 --- vim70.orig/src/gui.c 2006-05-03 04:00:59.000000000 -0700 5712 +++ vim70/src/gui.c 2007-0 1-23 17:15:05.000000000 -08005709 +++ vim70/src/gui.c 2007-02-15 21:22:26.000000000 -0800 5713 5710 @@ -187,9 +187,10 @@ 5714 5711 #endif … … 5811 5808 /* 5812 5809 * Update the current window and the screen. 5810 diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c 5811 --- vim70.orig/src/gui_at_fs.c 2005-07-09 04:30:17.000000000 -0700 5812 +++ vim70/src/gui_at_fs.c 2007-02-15 21:22:24.000000000 -0800 5813 @@ -1861,27 +1861,27 @@ 5814 XtPointer pnew; 5815 { 5816 SFDir *dir; 5817 - int nw; 5818 + int nw = (int)(long)pnew; 5819 5820 dir = &(SFdirs[SFdirPtr + (int)(long)n]); 5821 5822 #ifdef FEAT_GUI_NEXTAW 5823 - if ((int)(long)pnew < 0) 5824 + if (nw < 0) 5825 { 5826 - if ((int)(long)pnew > -SFvScrollHeight) 5827 - (int)(long)pnew = -1; 5828 + if (nw > -SFvScrollHeight) 5829 + nw = -1; 5830 else 5831 - (int)(long)pnew = -SFlistSize; 5832 + nw = -SFlistSize; 5833 } 5834 - else if ((int)(long)pnew > 0) 5835 + else if (nw > 0) 5836 { 5837 - if ((int)(long)pnew < SFvScrollHeight) 5838 - (int)(long)pnew = 1; 5839 + if (nw < SFvScrollHeight) 5840 + nw = 1; 5841 else 5842 - (int)(long)pnew = SFlistSize; 5843 + nw = SFlistSize; 5844 } 5845 #endif 5846 - nw = dir->vOrigin + (int)(long)pnew; 5847 + nw += dir->vOrigin; 5848 5849 if (nw > dir->nEntries - SFlistSize) 5850 nw = dir->nEntries - SFlistSize; 5851 @@ -1941,27 +1941,27 @@ 5852 XtPointer pnew; 5853 { 5854 SFDir *dir; 5855 - int nw; 5856 + int nw = (int)(long)pnew; 5857 5858 dir = &(SFdirs[SFdirPtr + (int)(long)n]); 5859 5860 #ifdef FEAT_GUI_NEXTAW 5861 - if ((int)(long)pnew < 0) 5862 + if (nw < 0) 5863 { 5864 - if ((int)(long)pnew > -SFhScrollWidth) 5865 - (int)(long)pnew = -1; 5866 + if (nw > -SFhScrollWidth) 5867 + nw = -1; 5868 else 5869 - (int)(long)pnew = -SFcharsPerEntry; 5870 + nw = -SFcharsPerEntry; 5871 } 5872 - else if ((int)(long)pnew > 0) 5873 + else if (nw > 0) 5874 { 5875 - if ((int)(long)pnew < SFhScrollWidth) 5876 - (int)(long)pnew = 1; 5877 + if (nw < SFhScrollWidth) 5878 + nw = 1; 5879 else 5880 - (int)(long)pnew = SFcharsPerEntry; 5881 + nw = SFcharsPerEntry; 5882 } 5883 #endif 5884 - nw = dir->hOrigin + (int)(long)pnew; 5885 + nw += dir->hOrigin; 5886 5887 if (nw > dir->nChars - SFcharsPerEntry) 5888 nw = dir->nChars - SFcharsPerEntry; 5889 @@ -2038,26 +2038,26 @@ 5890 XtPointer client_data; 5891 XtPointer pnew; 5892 { 5893 - int nw; 5894 + int nw = (int)(long)pnew; 5895 float f; 5896 5897 #ifdef FEAT_GUI_NEXTAW 5898 - if ((int)(long)pnew < 0) 5899 + if (nw < 0) 5900 { 5901 - if ((int)(long)pnew > -SFpathScrollWidth) 5902 - (int)(long)pnew = -1; 5903 + if (nw > -SFpathScrollWidth) 5904 + nw = -1; 5905 else 5906 - (int)(long)pnew = -3; 5907 + nw = -3; 5908 } 5909 - else if ((int)(long)pnew > 0) 5910 + else if (nw > 0) 5911 { 5912 - if ((int)(long)pnew < SFpathScrollWidth) 5913 - (int)(long)pnew = 1; 5914 + if (nw < SFpathScrollWidth) 5915 + nw = 1; 5916 else 5917 - (int)(long)pnew = 3; 5918 + nw = 3; 5919 } 5920 #endif 5921 - nw = SFdirPtr + (int)(long)pnew; 5922 + nw += SFdirPtr; 5923 5924 if (nw > SFdirEnd - 3) 5925 nw = SFdirEnd - 3; 5926 diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c 5927 --- vim70.orig/src/gui_beval.c 2006-05-04 12:29:51.000000000 -0700 5928 +++ vim70/src/gui_beval.c 2007-02-15 21:22:25.000000000 -0800 5929 @@ -926,7 +926,7 @@ 5930 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \ 5931 || (c) == DEL) 5932 static void 5933 -set_printable_label_text(GtkLabel *label, char_u *msg) 5934 +set_printable_label_text(GtkLabel *label, char_u *text) 5935 { 5936 char_u *convbuf = NULL; 5937 char_u *buf; 5938 @@ -940,14 +940,14 @@ 5939 /* Convert to UTF-8 if it isn't already */ 5940 if (output_conv.vc_type != CONV_NONE) 5941 { 5942 - convbuf = string_convert(&output_conv, msg, NULL); 5943 + convbuf = string_convert(&output_conv, text, NULL); 5944 if (convbuf != NULL) 5945 - msg = convbuf; 5946 + text = convbuf; 5947 } 5948 5949 /* First let's see how much we need to allocate */ 5950 len = 0; 5951 - for (p = msg; *p != NUL; p += charlen) 5952 + for (p = text; *p != NUL; p += charlen) 5953 { 5954 if ((*p & 0x80) == 0) /* be quick for ASCII */ 5955 { 5956 @@ -992,7 +992,7 @@ 5957 (unsigned long)pixel, &color); 5958 5959 pdest = buf; 5960 - p = msg; 5961 + p = text; 5962 while (*p != NUL) 5963 { 5964 /* Be quick for ASCII */ 5813 5965 diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c 5814 5966 --- vim70.orig/src/gui_gtk.c 2006-05-05 04:52:52.000000000 -0700 5815 +++ vim70/src/gui_gtk.c 2007-0 1-23 17:15:08.000000000 -08005967 +++ vim70/src/gui_gtk.c 2007-02-15 21:22:26.000000000 -0800 5816 5968 @@ -957,15 +957,15 @@ 5817 5969 get_menu_position(vimmenu_T *menu) … … 5911 6063 diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c 5912 6064 --- vim70.orig/src/gui_gtk_x11.c 2006-05-04 23:58:59.000000000 -0700 5913 +++ vim70/src/gui_gtk_x11.c 2007-0 1-23 17:14:55.000000000 -08006065 +++ vim70/src/gui_gtk_x11.c 2007-02-15 21:22:25.000000000 -0800 5914 6066 @@ -3233,12 +3233,12 @@ 5915 6067 on_select_tab( … … 5976 6128 diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c 5977 6129 --- vim70.orig/src/gui_xmebw.c 2006-04-30 08:32:32.000000000 -0700 5978 +++ vim70/src/gui_xmebw.c 2007-0 1-23 17:15:08.000000000 -08006130 +++ vim70/src/gui_xmebw.c 2007-02-15 21:22:26.000000000 -0800 5979 6131 @@ -47,13 +47,13 @@ 5980 6132 #include "gui_xmebwp.h" … … 6105 6257 diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c 6106 6258 --- vim70.orig/src/hardcopy.c 2006-05-04 03:09:58.000000000 -0700 6107 +++ vim70/src/hardcopy.c 2007-0 1-23 17:14:55.000000000 -08006259 +++ vim70/src/hardcopy.c 2007-02-15 21:22:25.000000000 -0800 6108 6260 @@ -1794,29 +1794,27 @@ 6109 6261 static int … … 6208 6360 diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c 6209 6361 --- vim70.orig/src/if_cscope.c 2006-04-18 01:54:15.000000000 -0700 6210 +++ vim70/src/if_cscope.c 2007-0 1-23 17:15:15.000000000 -08006362 +++ vim70/src/if_cscope.c 2007-02-15 21:22:27.000000000 -0800 6211 6363 @@ -627,10 +627,11 @@ 6212 6364 * If the database is out of date, or there's some other problem, … … 6338 6490 diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs 6339 6491 --- vim70.orig/src/if_perl.xs 2006-03-06 10:57:16.000000000 -0800 6340 +++ vim70/src/if_perl.xs 2007-0 1-23 17:14:52.000000000 -08006492 +++ vim70/src/if_perl.xs 2007-02-15 21:22:24.000000000 -0800 6341 6493 @@ -155,8 +155,8 @@ 6342 6494 static int (*perl_run)(PerlInterpreter*); … … 6453 6605 diff -Naur vim70.orig/src/if_python.c vim70/src/if_python.c 6454 6606 --- vim70.orig/src/if_python.c 2006-04-30 08:31:36.000000000 -0700 6455 +++ vim70/src/if_python.c 2007-0 1-23 17:15:02.000000000 -08006607 +++ vim70/src/if_python.c 2007-02-15 21:22:25.000000000 -0800 6456 6608 @@ -1463,7 +1463,7 @@ 6457 6609 if (this->buf && this->buf != INVALID_BUFFER_VALUE) … … 6492 6644 diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c 6493 6645 --- vim70.orig/src/if_ruby.c 2006-04-30 08:37:52.000000000 -0700 6494 +++ vim70/src/if_ruby.c 2007-0 1-23 17:14:52.000000000 -08006646 +++ vim70/src/if_ruby.c 2007-02-15 21:22:24.000000000 -0800 6495 6647 @@ -643,11 +643,14 @@ 6496 6648 … … 6607 6759 diff -Naur vim70.orig/src/macros.h vim70/src/macros.h 6608 6760 --- vim70.orig/src/macros.h 2006-03-01 04:01:10.000000000 -0800 6609 +++ vim70/src/macros.h 2007-0 1-23 17:14:57.000000000 -08006761 +++ vim70/src/macros.h 2007-02-15 21:22:25.000000000 -0800 6610 6762 @@ -276,3 +276,9 @@ 6611 6763 # define MB_CHARLEN(p) STRLEN(p) … … 6620 6772 diff -Naur vim70.orig/src/main.c vim70/src/main.c 6621 6773 --- vim70.orig/src/main.c 2006-05-03 10:36:44.000000000 -0700 6622 +++ vim70/src/main.c 2007-0 1-23 17:15:10.000000000 -08006774 +++ vim70/src/main.c 2007-02-15 21:22:26.000000000 -0800 6623 6775 @@ -564,7 +564,11 @@ 6624 6776 */ … … 6812 6964 parmp->serverName_arg != NULL)) 6813 6965 { 6814 diff -Naur vim70.orig/src/Makefile vim70/src/Makefile6815 --- vim70.orig/src/Makefile 2006-05-07 06:25:27.000000000 -07006816 +++ vim70/src/Makefile 2007-01-23 17:14:56.000000000 -08006817 @@ -2177,6 +2177,7 @@6818 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .6819 if test -d $(RSRC_DIR); then \6820 cd $(SHADOWDIR); \6821 + ln -s ../infplist.xml .; \6822 ln -s ../$(RSRC_DIR) ../os_mac.rsr.hqx ../dehqx.py .; \6823 fi6824 mkdir $(SHADOWDIR)/testdir6825 @@ -2260,7 +2261,7 @@6826 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in6827 CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh6828 6829 -QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'6830 +QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/'6831 auto/pathdef.c: Makefile auto/config.mk6832 -@echo creating $@6833 -@echo '/* pathdef.c */' > $@6834 6966 diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c 6835 6967 --- vim70.orig/src/mbyte.c 2006-04-30 04:51:01.000000000 -0700 6836 +++ vim70/src/mbyte.c 2007-0 1-23 17:15:12.000000000 -08006968 +++ vim70/src/mbyte.c 2007-02-15 21:22:27.000000000 -0800 6837 6969 @@ -311,7 +311,11 @@ 6838 6970 … … 6931 7063 diff -Naur vim70.orig/src/memfile.c vim70/src/memfile.c 6932 7064 --- vim70.orig/src/memfile.c 2006-03-06 00:59:15.000000000 -0800 6933 +++ vim70/src/memfile.c 2007-01-23 17:15:10.000000000 -0800 6934 @@ -517,7 +517,7 @@ 7065 +++ vim70/src/memfile.c 2007-02-15 21:22:27.000000000 -0800 7066 @@ -76,7 +76,6 @@ 7067 #define MEMFILE_PAGE_SIZE 4096 /* default page size */ 7068 7069 static long_u total_mem_used = 0; /* total memory used for memfiles */ 7070 -static int dont_release = FALSE; /* don't release blocks */ 7071 7072 static void mf_ins_hash __ARGS((memfile_T *, bhdr_T *)); 7073 static void mf_rem_hash __ARGS((memfile_T *, bhdr_T *)); 7074 @@ -279,10 +278,10 @@ 7075 if (getlines) 7076 { 7077 /* get all blocks in memory by accessing all lines (clumsy!) */ 7078 - dont_release = TRUE; 7079 + mf_dont_release = TRUE; 7080 for (lnum = 1; lnum <= buf->b_ml.ml_line_count; ++lnum) 7081 (void)ml_get_buf(buf, lnum, FALSE); 7082 - dont_release = FALSE; 7083 + mf_dont_release = FALSE; 7084 /* TODO: should check if all blocks are really in core */ 7085 } 7086 7087 @@ -517,7 +516,7 @@ 6935 7088 mf_ins_free(mfp, hp); /* put *hp in the free list */ 6936 7089 } … … 6941 7094 extern unsigned long *__stdfiledes; 6942 7095 6943 @@ -677,15 +67 7,19 @@7096 @@ -677,15 +676,19 @@ 6944 7097 # else 6945 7098 # if defined(_DCC) || defined(__GNUC__) || defined(__MORPHOS__) … … 6962 7115 # else /* assume Manx */ 6963 7116 Flush(_devtab[mfp->mf_fd].fd); 6964 @@ -1024,12 +1028,12 @@ 7117 @@ -826,7 +829,7 @@ 7118 buf_T *buf; 7119 7120 /* don't release while in mf_close_file() */ 7121 - if (dont_release) 7122 + if (mf_dont_release) 7123 return NULL; 7124 7125 /* 7126 @@ -1024,12 +1027,12 @@ 6965 7127 size = page_size * hp->bh_page_count; 6966 7128 if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset) … … 6977 7139 } 6978 7140 return OK; 6979 @@ -1081,7 +108 5,7 @@7141 @@ -1081,7 +1084,7 @@ 6980 7142 offset = (off_t)page_size * nr; 6981 7143 if (lseek(mfp->mf_fd, offset, SEEK_SET) != offset) … … 6988 7150 diff -Naur vim70.orig/src/memline.c vim70/src/memline.c 6989 7151 --- vim70.orig/src/memline.c 2006-04-20 14:00:21.000000000 -0700 6990 +++ vim70/src/memline.c 2007-0 1-23 17:15:12.000000000 -08007152 +++ vim70/src/memline.c 2007-02-15 21:22:27.000000000 -0800 6991 7153 @@ -215,7 +215,7 @@ 6992 7154 #define ML_FLUSH 0x02 /* flush locked block */ … … 7054 7216 7055 7217 /* 7056 @@ -3652,6 +3660,7 @@ 7218 @@ -2040,13 +2048,21 @@ 7219 linenr_T lnum; 7220 int will_change; /* line will be changed */ 7221 { 7222 - bhdr_T *hp; 7223 - DATA_BL *dp; 7224 - char_u *ptr; 7225 + bhdr_T *hp; 7226 + DATA_BL *dp; 7227 + char_u *ptr; 7228 + static int recursive = 0; 7229 7230 if (lnum > buf->b_ml.ml_line_count) /* invalid line number */ 7231 { 7232 - EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum); 7233 + if (recursive == 0) 7234 + { 7235 + /* Avoid giving this message for a recursive call, may happen when 7236 + * the GUI redraws part of the text. */ 7237 + ++recursive; 7238 + EMSGN(_("E315: ml_get: invalid lnum: %ld"), lnum); 7239 + --recursive; 7240 + } 7241 errorret: 7242 STRCPY(IObuff, "???"); 7243 return IObuff; 7244 @@ -2060,8 +2076,10 @@ 7245 /* 7246 * See if it is the same line as requested last time. 7247 * Otherwise may need to flush last used line. 7248 + * Don't use the last used line when 'swapfile' is reset, need to load all 7249 + * blocks. 7250 */ 7251 - if (buf->b_ml.ml_line_lnum != lnum) 7252 + if (buf->b_ml.ml_line_lnum != lnum || mf_dont_release) 7253 { 7254 ml_flush_line(buf); 7255 7256 @@ -2072,7 +2090,14 @@ 7257 */ 7258 if ((hp = ml_find_line(buf, lnum, ML_FIND)) == NULL) 7259 { 7260 - EMSGN(_("E316: ml_get: cannot find line %ld"), lnum); 7261 + if (recursive == 0) 7262 + { 7263 + /* Avoid giving this message for a recursive call, may happen 7264 + * when the GUI redraws part of the text. */ 7265 + ++recursive; 7266 + EMSGN(_("E316: ml_get: cannot find line %ld"), lnum); 7267 + --recursive; 7268 + } 7269 goto errorret; 7270 } 7271 7272 @@ -3186,13 +3211,16 @@ 7273 * If not, flush and release the locked block. 7274 * Don't do this for ML_INSERT_SAME, because the stack need to be updated. 7275 * Don't do this for ML_FLUSH, because we want to flush the locked block. 7276 + * Don't do this when 'swapfile' is reset, we want to load all the blocks. 7277 */ 7278 if (buf->b_ml.ml_locked) 7279 { 7280 - if (ML_SIMPLE(action) && buf->b_ml.ml_locked_low <= lnum 7281 - && buf->b_ml.ml_locked_high >= lnum) 7282 + if (ML_SIMPLE(action) 7283 + && buf->b_ml.ml_locked_low <= lnum 7284 + && buf->b_ml.ml_locked_high >= lnum 7285 + && !mf_dont_release) 7286 { 7287 - /* remember to update pointer blocks and stack later */ 7288 + /* remember to update pointer blocks and stack later */ 7289 if (action == ML_INSERT) 7290 { 7291 ++(buf->b_ml.ml_locked_lineadd); 7292 @@ -3652,6 +3680,7 @@ 7057 7293 { 7058 7294 struct stat st; … … 7062 7298 ++no_wait_return; 7063 7299 (void)EMSG(_("E325: ATTENTION")); 7064 @@ -3666,7 +36 75,11 @@7300 @@ -3666,7 +3695,11 @@ 7065 7301 { 7066 7302 MSG_PUTS(_(" dated: ")); … … 7077 7313 diff -Naur vim70.orig/src/menu.c vim70/src/menu.c 7078 7314 --- vim70.orig/src/menu.c 2006-05-03 10:30:48.000000000 -0700 7079 +++ vim70/src/menu.c 2007-0 1-23 17:15:12.000000000 -08007315 +++ vim70/src/menu.c 2007-02-15 21:22:27.000000000 -0800 7080 7316 @@ -511,6 +511,14 @@ 7081 7317 * name (without mnemonic and accelerator text). */ … … 7163 7399 diff -Naur vim70.orig/src/message.c vim70/src/message.c 7164 7400 --- vim70.orig/src/message.c 2006-05-06 13:07:37.000000000 -0700 7165 +++ vim70/src/message.c 2007-0 1-23 17:15:17.000000000 -08007401 +++ vim70/src/message.c 2007-02-15 21:22:27.000000000 -0800 7166 7402 @@ -53,7 +53,6 @@ 7167 7403 static struct msg_hist *first_msg_hist = NULL; … … 7253 7489 diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c 7254 7490 --- vim70.orig/src/misc1.c 2006-04-30 08:30:02.000000000 -0700 7255 +++ vim70/src/misc1.c 2007-0 1-23 17:15:07.000000000 -08007491 +++ vim70/src/misc1.c 2007-02-15 21:22:26.000000000 -0800 7256 7492 @@ -1761,15 +1761,13 @@ 7257 7493 * Add column offset for 'number', 'foldcolumn', etc. … … 7368 7604 diff -Naur vim70.orig/src/misc2.c vim70/src/misc2.c 7369 7605 --- vim70.orig/src/misc2.c 2006-05-04 05:12:38.000000000 -0700 7370 +++ vim70/src/misc2.c 2007-0 1-23 17:15:02.000000000 -08007606 +++ vim70/src/misc2.c 2007-02-15 21:22:25.000000000 -0800 7371 7607 @@ -1229,6 +1229,94 @@ 7372 7608 return escaped_string; … … 7466 7702 diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c 7467 7703 --- vim70.orig/src/netbeans.c 2006-04-22 11:00:05.000000000 -0700 7468 +++ vim70/src/netbeans.c 2007-0 1-23 17:15:10.000000000 -08007704 +++ vim70/src/netbeans.c 2007-02-15 21:22:26.000000000 -0800 7469 7705 @@ -61,7 +61,7 @@ 7470 7706 … … 7675 7911 diff -Naur vim70.orig/src/normal.c vim70/src/normal.c 7676 7912 --- vim70.orig/src/normal.c 2006-04-29 06:11:18.000000000 -0700 7677 +++ vim70/src/normal.c 2007-0 1-23 17:15:12.000000000 -08007913 +++ vim70/src/normal.c 2007-02-15 21:22:27.000000000 -0800 7678 7914 @@ -651,9 +651,8 @@ 7679 7915 /* Fake a "c"hange command. When "restart_edit" is set (e.g., because … … 7774 8010 diff -Naur vim70.orig/src/ops.c vim70/src/ops.c 7775 8011 --- vim70.orig/src/ops.c 2006-04-30 08:13:44.000000000 -0700 7776 +++ vim70/src/ops.c 2007-0 1-23 17:15:10.000000000 -08008012 +++ vim70/src/ops.c 2007-02-15 21:22:26.000000000 -0800 7777 8013 @@ -95,8 +95,8 @@ 7778 8014 static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp)); … … 7974 8210 diff -Naur vim70.orig/src/option.c vim70/src/option.c 7975 8211 --- vim70.orig/src/option.c 2006-05-03 10:32:28.000000000 -0700 7976 +++ vim70/src/option.c 2007-0 1-23 17:15:07.000000000 -08008212 +++ vim70/src/option.c 2007-02-15 21:22:26.000000000 -0800 7977 8213 @@ -2294,7 +2294,7 @@ 7978 8214 {(char_u *)0L, (char_u *)0L} … … 8090 8326 diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c 8091 8327 --- vim70.orig/src/os_unix.c 2006-05-01 01:13:15.000000000 -0700 8092 +++ vim70/src/os_unix.c 2007-0 1-23 17:14:55.000000000 -08008328 +++ vim70/src/os_unix.c 2007-02-15 21:22:25.000000000 -0800 8093 8329 @@ -3934,7 +3934,7 @@ 8094 8330 { … … 8149 8385 diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c 8150 8386 --- vim70.orig/src/popupmnu.c 2006-04-20 13:18:37.000000000 -0700 8151 +++ vim70/src/popupmnu.c 2007-0 1-23 17:14:53.000000000 -08008387 +++ vim70/src/popupmnu.c 2007-02-15 21:22:24.000000000 -0800 8152 8388 @@ -552,6 +552,9 @@ 8153 8389 { … … 8162 8398 diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro 8163 8399 --- vim70.orig/src/proto/buffer.pro 2006-05-07 06:08:29.000000000 -0700 8164 +++ vim70/src/proto/buffer.pro 2007-0 1-23 17:14:57.000000000 -08008400 +++ vim70/src/proto/buffer.pro 2007-02-15 21:22:25.000000000 -0800 8165 8401 @@ -10,6 +10,7 @@ 8166 8402 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit)); … … 8173 8409 diff -Naur vim70.orig/src/proto/eval.pro vim70/src/proto/eval.pro 8174 8410 --- vim70.orig/src/proto/eval.pro 2006-05-07 06:08:33.000000000 -0700 8175 +++ vim70/src/proto/eval.pro 2007-0 1-23 17:15:06.000000000 -08008411 +++ vim70/src/proto/eval.pro 2007-02-15 21:22:26.000000000 -0800 8176 8412 @@ -44,7 +44,7 @@ 8177 8413 extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx)); … … 8185 8421 diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro 8186 8422 --- vim70.orig/src/proto/menu.pro 2006-05-07 06:08:51.000000000 -0700 8187 +++ vim70/src/proto/menu.pro 2007-0 1-23 17:14:53.000000000 -08008423 +++ vim70/src/proto/menu.pro 2007-02-15 21:22:24.000000000 -0800 8188 8424 @@ -10,6 +10,7 @@ 8189 8425 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu)); … … 8196 8432 diff -Naur vim70.orig/src/proto/misc2.pro vim70/src/proto/misc2.pro 8197 8433 --- vim70.orig/src/proto/misc2.pro 2006-05-07 06:08:54.000000000 -0700 8198 +++ vim70/src/proto/misc2.pro 2007-0 1-23 17:15:02.000000000 -08008434 +++ vim70/src/proto/misc2.pro 2007-02-15 21:22:25.000000000 -0800 8199 8435 @@ -29,6 +29,7 @@ 8200 8436 extern char_u *vim_strnsave __ARGS((char_u *string, int len)); … … 8207 8443 diff -Naur vim70.orig/src/proto/ops.pro vim70/src/proto/ops.pro 8208 8444 --- vim70.orig/src/proto/ops.pro 2006-05-07 06:08:58.000000000 -0700 8209 +++ vim70/src/proto/ops.pro 2007-0 1-23 17:15:10.000000000 -08008445 +++ vim70/src/proto/ops.pro 2007-02-15 21:22:26.000000000 -0800 8210 8446 @@ -17,10 +17,10 @@ 8211 8447 extern void put_register __ARGS((int name, void *reg)); … … 8223 8459 diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro 8224 8460 --- vim70.orig/src/proto/undo.pro 2006-05-07 06:09:11.000000000 -0700 8225 +++ vim70/src/proto/undo.pro 2007-0 1-23 17:14:49.000000000 -08008461 +++ vim70/src/proto/undo.pro 2007-02-15 21:22:24.000000000 -0800 8226 8462 @@ -4,6 +4,7 @@ 8227 8463 extern int u_savesub __ARGS((linenr_T lnum)); … … 8234 8470 diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c 8235 8471 --- vim70.orig/src/quickfix.c 2006-05-03 00:47:42.000000000 -0700 8236 +++ vim70/src/quickfix.c 2007-01-23 17:15:07.000000000 -0800 8472 +++ vim70/src/quickfix.c 2007-02-15 21:22:27.000000000 -0800 8473 @@ -106,7 +106,7 @@ 8474 8475 static int qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u *errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast)); 8476 static void qf_new_list __ARGS((qf_info_T *qi)); 8477 -static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid)); 8478 +static int qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid)); 8479 static void qf_msg __ARGS((qf_info_T *qi)); 8480 static void qf_free __ARGS((qf_info_T *qi, int idx)); 8481 static char_u *qf_types __ARGS((int, int)); 8237 8482 @@ -500,8 +500,6 @@ 8238 8483 { … … 8330 8575 if (len > CMDBUFFSIZE - 5) 8331 8576 len = CMDBUFFSIZE - 5; 8332 @@ -1554,10 +1586,30 @@ 8577 @@ -759,6 +791,7 @@ 8578 (*namebuf || directory) 8579 ? namebuf 8580 : ((currfile && valid) ? currfile : (char_u *)NULL), 8581 + 0, 8582 errmsg, 8583 lnum, 8584 col, 8585 @@ -904,12 +937,13 @@ 8586 * Returns OK or FAIL. 8587 */ 8588 static int 8589 -qf_add_entry(qi, prevp, dir, fname, mesg, lnum, col, vis_col, pattern, nr, type, 8590 - valid) 8591 +qf_add_entry(qi, prevp, dir, fname, bufnum, mesg, lnum, col, vis_col, pattern, 8592 + nr, type, valid) 8593 qf_info_T *qi; /* quickfix list */ 8594 qfline_T **prevp; /* pointer to previously added entry or NULL */ 8595 char_u *dir; /* optional directory name */ 8596 char_u *fname; /* file name or NULL */ 8597 + int bufnum; /* buffer number or zero */ 8598 char_u *mesg; /* message */ 8599 long lnum; /* line number */ 8600 int col; /* column */ 8601 @@ -923,7 +957,10 @@ 8602 8603 if ((qfp = (qfline_T *)alloc((unsigned)sizeof(qfline_T))) == NULL) 8604 return FAIL; 8605 - qfp->qf_fnum = qf_get_fnum(dir, fname); 8606 + if (bufnum != 0) 8607 + qfp->qf_fnum = bufnum; 8608 + else 8609 + qfp->qf_fnum = qf_get_fnum(dir, fname); 8610 if ((qfp->qf_text = vim_strsave(mesg)) == NULL) 8611 { 8612 vim_free(qfp); 8613 @@ -1074,6 +1111,7 @@ 8614 if (qf_add_entry(to->w_llist, &prevp, 8615 NULL, 8616 NULL, 8617 + 0, 8618 from_qfp->qf_text, 8619 from_qfp->qf_lnum, 8620 from_qfp->qf_col, 8621 @@ -1554,10 +1592,30 @@ 8333 8622 } 8334 8623 … … 8338 8627 + * If no usable window is found and 'switchbuf' is set to 'usetab' 8339 8628 + * then search in other tabs. 8340 */ 8341 - if (firstwin == lastwin || !usable_win) 8629 + */ 8342 8630 + if (!usable_win && vim_strchr(p_swb, 'a') != NULL) 8343 8631 + { … … 8359 8647 + * If there is only one window and is the quickfix window, create a new 8360 8648 + * one above the quickfix window. 8361 + */ 8649 */ 8650 - if (firstwin == lastwin || !usable_win) 8362 8651 + if (((firstwin == lastwin) && bt_quickfix(curbuf)) || !usable_win) 8363 8652 { 8364 8653 ll_ref = curwin->w_llist_ref; 8365 8654 8366 @@ -2429,32 +248 1,19 @@8655 @@ -2429,32 +2487,19 @@ 8367 8656 qf_info_T *qi; 8368 8657 { … … 8397 8686 (void)qf_win_pos_update(qi, 0); 8398 8687 } 8399 @@ -2943,10 +298 2,8 @@8688 @@ -2943,10 +2988,8 @@ 8400 8689 #if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL) 8401 8690 char_u *save_ei = NULL; … … 8409 8698 int flags = 0; 8410 8699 colnr_T col; 8411 @@ -3167,24 +3204,13 @@ 8700 @@ -3097,6 +3140,7 @@ 8701 if (qf_add_entry(qi, &prevp, 8702 NULL, /* dir */ 8703 fnames[fi], 8704 + 0, 8705 ml_get_buf(buf, 8706 regmatch.startpos[0].lnum + lnum, FALSE), 8707 regmatch.startpos[0].lnum + lnum, 8708 @@ -3167,24 +3211,13 @@ 8412 8709 * need to be done now, in that buffer. And the modelines 8413 8710 * need to be done (again). But not the window-local … … 8434 8731 } 8435 8732 } 8436 @@ -3285,11 +331 1,7 @@8733 @@ -3285,11 +3318,7 @@ 8437 8734 { 8438 8735 buf_T *newbuf; … … 8446 8743 /* Allocate a buffer without putting it in the buffer list. */ 8447 8744 newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY); 8448 @@ -3299,13 +332 1,8 @@8745 @@ -3299,13 +3328,8 @@ 8449 8746 /* Init the options. */ 8450 8747 buf_copy_options(newbuf, BCO_ENTER | BCO_NOHELP); … … 8460 8757 /* Need to set the filename for autocommands. */ 8461 8758 (void)setfname(curbuf, fname, NULL, FALSE); 8462 @@ -3336,13 +33 53,8 @@8759 @@ -3336,13 +3360,8 @@ 8463 8760 } 8464 8761 } … … 8474 8771 if (!buf_valid(newbuf)) 8475 8772 return NULL; 8476 @@ -3434,8 +3446,10 @@ 8773 @@ -3407,6 +3426,7 @@ 8774 char_u buf[2]; 8775 qfline_T *qfp; 8776 int i; 8777 + int bufnum; 8778 8779 if (wp != NULL) 8780 { 8781 @@ -3422,6 +3442,11 @@ 8782 qfp = qi->qf_lists[qi->qf_curlist].qf_start; 8783 for (i = 1; !got_int && i <= qi->qf_lists[qi->qf_curlist].qf_count; ++i) 8784 { 8785 + /* Handle entries with a non-existing buffer number. */ 8786 + bufnum = qfp->qf_fnum; 8787 + if (bufnum != 0 && (buflist_findnr(bufnum) == NULL)) 8788 + bufnum = 0; 8789 + 8790 if ((dict = dict_alloc()) == NULL) 8791 return FAIL; 8792 if (list_append_dict(list, dict) == FAIL) 8793 @@ -3429,13 +3454,15 @@ 8794 8795 buf[0] = qfp->qf_type; 8796 buf[1] = NUL; 8797 - if ( dict_add_nr_str(dict, "bufnr", (long)qfp->qf_fnum, NULL) == FAIL 8798 + if ( dict_add_nr_str(dict, "bufnr", (long)bufnum, NULL) == FAIL 8799 || dict_add_nr_str(dict, "lnum", (long)qfp->qf_lnum, NULL) == FAIL 8477 8800 || dict_add_nr_str(dict, "col", (long)qfp->qf_col, NULL) == FAIL 8478 8801 || dict_add_nr_str(dict, "vcol", (long)qfp->qf_viscol, NULL) == FAIL … … 8487 8810 || dict_add_nr_str(dict, "valid", (long)qfp->qf_valid, NULL) == FAIL) 8488 8811 return FAIL; 8812 @@ -3458,6 +3485,7 @@ 8813 listitem_T *li; 8814 dict_T *d; 8815 char_u *filename, *pattern, *text, *type; 8816 + int bufnum; 8817 long lnum; 8818 int col, nr; 8819 int vcol; 8820 @@ -3465,6 +3493,7 @@ 8821 int valid, status; 8822 int retval = OK; 8823 qf_info_T *qi = &ql_info; 8824 + int did_bufnr_emsg = FALSE; 8825 8826 if (wp != NULL) 8827 { 8828 @@ -3494,6 +3523,7 @@ 8829 continue; 8830 8831 filename = get_dict_string(d, (char_u *)"filename", TRUE); 8832 + bufnum = get_dict_number(d, (char_u *)"bufnr"); 8833 lnum = get_dict_number(d, (char_u *)"lnum"); 8834 col = get_dict_number(d, (char_u *)"col"); 8835 vcol = get_dict_number(d, (char_u *)"vcol"); 8836 @@ -3505,12 +3535,26 @@ 8837 text = vim_strsave((char_u *)""); 8838 8839 valid = TRUE; 8840 - if (filename == NULL || (lnum == 0 && pattern == NULL)) 8841 + if ((filename == NULL && bufnum == 0) || (lnum == 0 && pattern == NULL)) 8842 + valid = FALSE; 8843 + 8844 + /* Mark entries with non-existing buffer number as not valid. Give the 8845 + * error message only once. */ 8846 + if (bufnum != 0 && (buflist_findnr(bufnum) == NULL)) 8847 + { 8848 + if (!did_bufnr_emsg) 8849 + { 8850 + did_bufnr_emsg = TRUE; 8851 + EMSGN(_("E92: Buffer %ld not found"), bufnum); 8852 + } 8853 valid = FALSE; 8854 + bufnum = 0; 8855 + } 8856 8857 status = qf_add_entry(qi, &prevp, 8858 NULL, /* dir */ 8859 filename, 8860 + bufnum, 8861 text, 8862 lnum, 8863 col, 8864 @@ -3743,6 +3787,7 @@ 8865 if (qf_add_entry(qi, &prevp, 8866 NULL, /* dir */ 8867 fnames[fi], 8868 + 0, 8869 IObuff, 8870 lnum, 8871 (int)(regmatch.startp[0] - IObuff) 8489 8872 diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c 8490 8873 --- vim70.orig/src/regexp.c 2006-04-30 08:31:50.000000000 -0700 8491 +++ vim70/src/regexp.c 2007-0 1-23 17:15:07.000000000 -08008874 +++ vim70/src/regexp.c 2007-02-15 21:22:26.000000000 -0800 8492 8875 @@ -3777,8 +3777,8 @@ 8493 8876 … … 8626 9009 diff -Naur vim70.orig/src/screen.c vim70/src/screen.c 8627 9010 --- vim70.orig/src/screen.c 2006-05-05 03:13:55.000000000 -0700 8628 +++ vim70/src/screen.c 2007-0 1-23 17:15:11.000000000 -08009011 +++ vim70/src/screen.c 2007-02-15 21:22:26.000000000 -0800 8629 9012 @@ -455,6 +455,7 @@ 8630 9013 && curwin->w_topline == curwin->w_lines[0].wl_lnum) … … 8810 9193 diff -Naur vim70.orig/src/search.c vim70/src/search.c 8811 9194 --- vim70.orig/src/search.c 2006-05-05 05:12:13.000000000 -0700 8812 +++ vim70/src/search.c 2007-0 1-23 17:15:26.000000000 -08009195 +++ vim70/src/search.c 2007-02-15 21:22:27.000000000 -0800 8813 9196 @@ -812,7 +812,11 @@ 8814 9197 #ifdef FEAT_MBYTE … … 8880 9263 diff -Naur vim70.orig/src/spell.c vim70/src/spell.c 8881 9264 --- vim70.orig/src/spell.c 2006-05-05 00:49:58.000000000 -0700 8882 +++ vim70/src/spell.c 2007-0 1-23 17:15:01.000000000 -08009265 +++ vim70/src/spell.c 2007-02-15 21:22:25.000000000 -0800 8883 9266 @@ -1483,7 +1483,7 @@ 8884 9267 else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND … … 9211 9594 diff -Naur vim70.orig/src/structs.h vim70/src/structs.h 9212 9595 --- vim70.orig/src/structs.h 2006-04-09 10:57:46.000000000 -0700 9213 +++ vim70/src/structs.h 2007-0 1-23 17:14:52.000000000 -08009596 +++ vim70/src/structs.h 2007-02-15 21:22:24.000000000 -0800 9214 9597 @@ -2213,18 +2213,20 @@ 9215 9598 … … 9237 9620 diff -Naur vim70.orig/src/syntax.c vim70/src/syntax.c 9238 9621 --- vim70.orig/src/syntax.c 2006-04-26 05:49:45.000000000 -0700 9239 +++ vim70/src/syntax.c 2007-0 1-23 17:15:09.000000000 -08009622 +++ vim70/src/syntax.c 2007-02-15 21:22:27.000000000 -0800 9240 9623 @@ -977,6 +977,7 @@ 9241 9624 { … … 9327 9710 } 9328 9711 9712 @@ -3188,7 +3206,7 @@ 9713 curbuf->b_syn_spell = SYNSPL_TOP; 9714 else if (STRNICMP(arg, "notoplevel", 10) == 0 && next - arg == 10) 9715 curbuf->b_syn_spell = SYNSPL_NOTOP; 9716 - else if (STRNICMP(arg, "default", 4) == 0 && next - arg == 4) 9717 + else if (STRNICMP(arg, "default", 7) == 0 && next - arg == 7) 9718 curbuf->b_syn_spell = SYNSPL_DEFAULT; 9719 else 9720 EMSG2(_("E390: Illegal argument: %s"), arg); 9329 9721 @@ -6054,7 +6072,11 @@ 9330 9722 ++level; … … 9341 9733 diff -Naur vim70.orig/src/tag.c vim70/src/tag.c 9342 9734 --- vim70.orig/src/tag.c 2006-04-27 06:11:21.000000000 -0700 9343 +++ vim70/src/tag.c 2007-0 1-23 17:15:06.000000000 -08009735 +++ vim70/src/tag.c 2007-02-15 21:22:26.000000000 -0800 9344 9736 @@ -911,7 +911,7 @@ 9345 9737 … … 9383 9775 diff -Naur vim70.orig/src/term.c vim70/src/term.c 9384 9776 --- vim70.orig/src/term.c 2006-05-03 10:34:57.000000000 -0700 9385 +++ vim70/src/term.c 2007-0 1-23 17:15:08.000000000 -08009777 +++ vim70/src/term.c 2007-02-15 21:22:26.000000000 -0800 9386 9778 @@ -3137,25 +3137,32 @@ 9387 9779 screenalloc(FALSE); … … 9447 9839 diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in 9448 9840 --- vim70.orig/src/testdir/test56.in 2005-05-18 08:37:37.000000000 -0700 9449 +++ vim70/src/testdir/test56.in 2007-0 1-23 17:14:57.000000000 -08009841 +++ vim70/src/testdir/test56.in 2007-02-15 21:22:25.000000000 -0800 9450 9842 @@ -3,7 +3,7 @@ 9451 9843 STARTTEST … … 9459 9851 diff -Naur vim70.orig/src/ui.c vim70/src/ui.c 9460 9852 --- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800 9461 +++ vim70/src/ui.c 2007-0 1-23 17:14:55.000000000 -08009853 +++ vim70/src/ui.c 2007-02-15 21:22:25.000000000 -0800 9462 9854 @@ -1137,7 +1137,6 @@ 9463 9855 int len; … … 9479 9871 diff -Naur vim70.orig/src/undo.c vim70/src/undo.c 9480 9872 --- vim70.orig/src/undo.c 2006-04-21 02:30:59.000000000 -0700 9481 +++ vim70/src/undo.c 2007-0 1-23 17:15:12.000000000 -08009873 +++ vim70/src/undo.c 2007-02-15 21:22:27.000000000 -0800 9482 9874 @@ -84,7 +84,6 @@ 9483 9875 static void u_unch_branch __ARGS((u_header_T *uhp)); … … 9582 9974 diff -Naur vim70.orig/src/version.c vim70/src/version.c 9583 9975 --- vim70.orig/src/version.c 2006-05-03 00:50:42.000000000 -0700 9584 +++ vim70/src/version.c 2007-0 1-23 17:15:26.000000000 -08009585 @@ -667,6 +667,3 46@@9976 +++ vim70/src/version.c 2007-02-15 21:22:27.000000000 -0800 9977 @@ -667,6 +667,360 @@ 9586 9978 static int included_patches[] = 9587 9979 { /* Add new patch number below this line */ 9588 9980 /**/ 9981 + 195, 9982 +/**/ 9983 + 194, 9984 +/**/ 9985 + 193, 9986 +/**/ 9987 + 192, 9988 +/**/ 9989 + 191, 9990 +/**/ 9991 + 190, 9992 +/**/ 9993 + 189, 9994 +/**/ 9589 9995 + 188, 9590 9996 +/**/ … … 9930 10336 }; 9931 10337 9932 @@ -731,7 +10 71,11 @@10338 @@ -731,7 +1085,11 @@ 9933 10339 /* Only MS VC 4.1 and earlier can do Win32s */ 9934 10340 MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version")); … … 9944 10350 diff -Naur vim70.orig/src/vim.h vim70/src/vim.h 9945 10351 --- vim70.orig/src/vim.h 2006-04-30 08:32:38.000000000 -0700 9946 +++ vim70/src/vim.h 2007-0 1-23 17:15:23.000000000 -080010352 +++ vim70/src/vim.h 2007-02-15 21:22:27.000000000 -0800 9947 10353 @@ -585,7 +585,6 @@ 9948 10354 #define INSERT 0x10 /* Insert mode */ … … 10002 10408 diff -Naur vim70.orig/src/window.c vim70/src/window.c 10003 10409 --- vim70.orig/src/window.c 2006-05-06 03:54:51.000000000 -0700 10004 +++ vim70/src/window.c 2007-0 1-23 17:15:11.000000000 -080010410 +++ vim70/src/window.c 2007-02-15 21:22:26.000000000 -0800 10005 10411 @@ -340,10 +340,10 @@ 10006 10412 {
Note:
See TracChangeset
for help on using the changeset viewer.