Changeset 95f1c95 in clfs-sysroot for patches/vim-7.0-fixes-22.patch
- Timestamp:
- Feb 6, 2007, 12:57:56 PM (19 years ago)
- Branches:
- master
- Children:
- b8f0f75
- Parents:
- 7ea0123
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/vim-7.0-fixes-22.patch
r7ea0123 r95f1c95 1 1 Submitted By: Jim Gifford (jim at linuxfromscratch dot org) 2 Date: 12-05-20062 Date: 01-23-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 786 Description: Contains all upstream patches up to 7.0.188 7 7 The following patches were skipped 8 005 027 028 032 045 057 065 074 108 130 131 132 138 156 161 170 171 8 005 027 028 032 045 057 065 074 108 130 131 132 138 156 161 170 171 180 9 9 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 200 6-12-05 19:57:51.000000000 -080012 +++ vim70/configure 2007-01-23 17:14:51.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 200 6-12-05 19:57:40.000000000 -080021 +++ vim70/runtime/autoload/ccomplete.vim 2007-01-23 17:14:45.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 200 6-12-05 19:58:04.000000000 -080042 +++ vim70/runtime/autoload/gzip.vim 2007-01-23 17:15:02.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 200 6-12-05 19:57:46.000000000 -0800103 +++ vim70/runtime/autoload/paste.vim 2007-01-23 17:14:49.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 200 6-12-05 19:57:58.000000000 -0800123 +++ vim70/runtime/autoload/spellfile.vim 2007-01-23 17:14:56.000000000 -0800 124 124 @@ -1,9 +1,9 @@ 125 125 " Vim script to download a missing spell file … … 175 175 + endif 176 176 +endfunc 177 diff -Naur vim70.orig/runtime/doc/autocmd.txt vim70/runtime/doc/autocmd.txt 178 --- vim70.orig/runtime/doc/autocmd.txt 2006-05-07 05:16:44.000000000 -0700 179 +++ vim70/runtime/doc/autocmd.txt 2007-01-23 17:15:23.000000000 -0800 180 @@ -1,4 +1,4 @@ 181 -*autocmd.txt* For Vim version 7.0. Last change: 2006 May 06 182 +*autocmd.txt* For Vim version 7.0. Last change: 2007 Jan 16 183 184 185 VIM REFERENCE MANUAL by Bram Moolenaar 186 @@ -279,6 +279,7 @@ 187 |FuncUndefined| a user function is used but it isn't defined 188 |SpellFileMissing| a spell file is used but it can't be found 189 |SourcePre| before sourcing a Vim script 190 +|SourceCmd| before sourcing a Vim script |Cmd-event| 191 192 |VimResized| after the Vim window size changed 193 |FocusGained| Vim got input focus 194 @@ -690,10 +691,17 @@ 195 Can be used to check for any changed files. 196 *SourcePre* 197 SourcePre Before sourcing a Vim script. |:source| 198 + <afile> is the name of the file being sourced. 199 + *SourceCmd* 200 +SourceCmd When sourcing a Vim script. |:source| 201 + <afile> is the name of the file being sourced. 202 + The autocommand must source this file. 203 + |Cmd-event| 204 *SpellFileMissing* 205 SpellFileMissing When trying to load a spell checking file and 206 - it can't be found. <amatch> is the language, 207 - 'encoding' also matters. See 208 + it can't be found. The pattern is matched 209 + against the language. <amatch> is the 210 + language, 'encoding' also matters. See 211 |spell-SpellFileMissing|. 212 *StdinReadPost* 213 StdinReadPost After reading from the stdin into the buffer, 214 @@ -1219,8 +1227,8 @@ 215 216 *Cmd-event* 217 When using one of the "*Cmd" events, the matching autocommands are expected to 218 -do the file reading or writing. This can be used when working with a special 219 -kind of file, for example on a remote system. 220 +do the file reading, writing or sourcing. This can be used when working with 221 +a special kind of file, for example on a remote system. 222 CAREFUL: If you use these events in a wrong way, it may have the effect of 223 making it impossible to read or write the matching files! Make sure you test 224 your autocommands properly. Best is to use a pattern that will never match a 225 @@ -1233,9 +1241,10 @@ 226 original file isn't needed for recovery. You might want to do this only when 227 you expect the file to be modified. 228 229 -The |v:cmdarg| variable holds the "++enc=" and "++ff=" argument that are 230 -effective. These should be used for the command that reads/writes the file. 231 -The |v:cmdbang| variable is one when "!" was used, zero otherwise. 232 +For file read and write commands the |v:cmdarg| variable holds the "++enc=" 233 +and "++ff=" argument that are effective. These should be used for the command 234 +that reads/writes the file. The |v:cmdbang| variable is one when "!" was 235 +used, zero otherwise. 236 237 See the $VIMRUNTIME/plugin/netrw.vim for examples. 238 177 239 diff -Naur vim70.orig/runtime/doc/eval.txt vim70/runtime/doc/eval.txt 178 240 --- vim70.orig/runtime/doc/eval.txt 2006-05-07 05:16:44.000000000 -0700 179 +++ vim70/runtime/doc/eval.txt 200 6-12-05 19:58:10.000000000 -0800241 +++ vim70/runtime/doc/eval.txt 2007-01-23 17:15:09.000000000 -0800 180 242 @@ -1,4 +1,4 @@ 181 243 -*eval.txt* For Vim version 7.0. Last change: 2006 May 06 … … 257 319 diff -Naur vim70.orig/runtime/doc/netbeans.txt vim70/runtime/doc/netbeans.txt 258 320 --- vim70.orig/runtime/doc/netbeans.txt 2006-05-07 05:16:45.000000000 -0700 259 +++ vim70/runtime/doc/netbeans.txt 200 6-12-05 19:58:11.000000000 -0800321 +++ vim70/runtime/doc/netbeans.txt 2007-01-23 17:15:10.000000000 -0800 260 322 @@ -1,4 +1,4 @@ 261 323 -*netbeans.txt* For Vim version 7.0. Last change: 2006 Mar 09 … … 293 355 diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim 294 356 --- vim70.orig/runtime/menu.vim 2006-04-17 06:47:28.000000000 -0700 295 +++ vim70/runtime/menu.vim 200 6-12-05 19:58:04.000000000 -0800357 +++ vim70/runtime/menu.vim 2007-01-23 17:15:02.000000000 -0800 296 358 @@ -2,7 +2,7 @@ 297 359 " You can also use this as a start for your own set of menus. … … 360 422 diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim 361 423 --- vim70.orig/runtime/plugin/matchparen.vim 2006-04-27 06:31:26.000000000 -0700 362 +++ vim70/runtime/plugin/matchparen.vim 200 6-12-05 19:58:01.000000000 -0800424 +++ vim70/runtime/plugin/matchparen.vim 2007-01-23 17:15:00.000000000 -0800 363 425 @@ -1,6 +1,6 @@ 364 426 " Vim plugin for showing matching parens … … 403 465 diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim 404 466 --- vim70.orig/runtime/scripts.vim 2006-03-28 11:30:49.000000000 -0800 405 +++ vim70/runtime/scripts.vim 200 6-12-05 19:57:51.000000000 -0800467 +++ vim70/runtime/scripts.vim 2007-01-23 17:14:51.000000000 -0800 406 468 @@ -1,7 +1,7 @@ 407 469 " Vim support file to detect file types in scripts … … 428 490 diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile 429 491 --- vim70.orig/runtime/tutor/Makefile 2004-06-07 07:32:39.000000000 -0700 430 +++ vim70/runtime/tutor/Makefile 200 6-12-05 19:58:01.000000000 -0800492 +++ vim70/runtime/tutor/Makefile 2007-01-23 17:15:00.000000000 -0800 431 493 @@ -2,8 +2,13 @@ 432 494 # … … 462 524 diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8 463 525 --- vim70.orig/runtime/tutor/tutor.gr.utf-8 1969-12-31 16:00:00.000000000 -0800 464 +++ vim70/runtime/tutor/tutor.gr.utf-8 200 6-12-05 19:58:01.000000000 -0800526 +++ vim70/runtime/tutor/tutor.gr.utf-8 2007-01-23 17:15:00.000000000 -0800 465 527 @@ -0,0 +1,815 @@ 466 528 +=============================================================================== … … 1495 1557 diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8 1496 1558 --- vim70.orig/runtime/tutor/tutor.ru.utf-8 1969-12-31 16:00:00.000000000 -0800 1497 +++ vim70/runtime/tutor/tutor.ru.utf-8 200 6-12-05 19:57:59.000000000 -08001559 +++ vim70/runtime/tutor/tutor.ru.utf-8 2007-01-23 17:14:56.000000000 -0800 1498 1560 @@ -0,0 +1,834 @@ 1499 1561 +=============================================================================== … … 2416 2478 diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim 2417 2479 --- vim70.orig/runtime/tutor/tutor.vim 2006-03-18 12:20:36.000000000 -0800 2418 +++ vim70/runtime/tutor/tutor.vim 200 6-12-05 19:58:01.000000000 -08002480 +++ vim70/runtime/tutor/tutor.vim 2007-01-23 17:15:00.000000000 -0800 2419 2481 @@ -1,6 +1,6 @@ 2420 2482 " Vim tutor support file … … 2468 2530 diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure 2469 2531 --- vim70.orig/src/auto/configure 2006-05-04 03:46:19.000000000 -0700 2470 +++ vim70/src/auto/configure 200 6-12-05 19:58:07.000000000 -08002532 +++ vim70/src/auto/configure 2007-01-23 17:15:06.000000000 -0800 2471 2533 @@ -4014,7 +4014,7 @@ 2472 2534 LDFLAGS=$ldflags_save … … 2509 2571 diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c 2510 2572 --- vim70.orig/src/buffer.c 2006-04-26 14:37:23.000000000 -0700 2511 +++ vim70/src/buffer.c 200 6-12-05 19:58:11.000000000 -08002573 +++ vim70/src/buffer.c 2007-01-23 17:15:10.000000000 -0800 2512 2574 @@ -434,12 +434,8 @@ 2513 2575 if (usingNetbeans) … … 2660 2722 diff -Naur vim70.orig/src/configure vim70/src/configure 2661 2723 --- vim70.orig/src/configure 2006-05-07 07:17:49.000000000 -0700 2662 +++ vim70/src/configure 200 6-12-05 19:57:51.000000000 -08002724 +++ vim70/src/configure 2007-01-23 17:14:51.000000000 -0800 2663 2725 @@ -2,5 +2,9 @@ 2664 2726 # run the automatically generated configure script … … 2673 2735 diff -Naur vim70.orig/src/configure.in vim70/src/configure.in 2674 2736 --- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700 2675 +++ vim70/src/configure.in 200 6-12-05 19:58:07.000000000 -08002737 +++ vim70/src/configure.in 2007-01-23 17:15:06.000000000 -0800 2676 2738 @@ -508,7 +508,8 @@ 2677 2739 LDFLAGS=$ldflags_save … … 2716 2778 diff -Naur vim70.orig/src/edit.c vim70/src/edit.c 2717 2779 --- vim70.orig/src/edit.c 2006-05-07 04:48:51.000000000 -0700 2718 +++ vim70/src/edit.c 200 6-12-05 19:58:11.000000000 -08002780 +++ vim70/src/edit.c 2007-01-23 17:15:10.000000000 -0800 2719 2781 @@ -129,7 +129,7 @@ 2720 2782 … … 3337 3399 diff -Naur vim70.orig/src/eval.c vim70/src/eval.c 3338 3400 --- vim70.orig/src/eval.c 2006-05-05 10:15:26.000000000 -0700 3339 +++ vim70/src/eval.c 200 6-12-05 19:58:24.000000000 -08003401 +++ vim70/src/eval.c 2007-01-23 17:15:12.000000000 -0800 3340 3402 @@ -166,7 +166,6 @@ 3341 3403 int uf_tm_count; /* nr of calls */ … … 3399 3461 static void copy_tv __ARGS((typval_T *from, typval_T *to)); 3400 3462 static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID)); 3401 @@ -2260,7 +2262,7 @@ 3463 @@ -896,6 +898,7 @@ 3464 } 3465 3466 static lval_T *redir_lval = NULL; 3467 +static garray_T redir_ga; /* only valid when redir_lval is not NULL */ 3468 static char_u *redir_endp = NULL; 3469 static char_u *redir_varname = NULL; 3470 3471 @@ -930,6 +933,9 @@ 3472 return FAIL; 3473 } 3474 3475 + /* The output is stored in growarray "redir_ga" until redirection ends. */ 3476 + ga_init2(&redir_ga, (int)sizeof(char), 500); 3477 + 3478 /* Parse the variable name (can be a dict or list entry). */ 3479 redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, FALSE, 3480 FNE_CHECK_START); 3481 @@ -972,42 +978,36 @@ 3482 } 3483 3484 /* 3485 - * Append "value[len]" to the variable set by var_redir_start(). 3486 + * Append "value[value_len]" to the variable set by var_redir_start(). 3487 + * The actual appending is postponed until redirection ends, because the value 3488 + * appended may in fact be the string we write to, changing it may cause freed 3489 + * memory to be used: 3490 + * :redir => foo 3491 + * :let foo 3492 + * :redir END 3493 */ 3494 void 3495 -var_redir_str(value, len) 3496 +var_redir_str(value, value_len) 3497 char_u *value; 3498 - int len; 3499 + int value_len; 3500 { 3501 - char_u *val; 3502 - typval_T tv; 3503 - int save_emsg; 3504 - int err; 3505 + size_t len; 3506 3507 if (redir_lval == NULL) 3508 return; 3509 3510 - if (len == -1) 3511 - /* Append the entire string */ 3512 - val = vim_strsave(value); 3513 + if (value_len == -1) 3514 + len = STRLEN(value); /* Append the entire string */ 3515 else 3516 - /* Append only the specified number of characters */ 3517 - val = vim_strnsave(value, len); 3518 - if (val == NULL) 3519 - return; 3520 + len = value_len; /* Append only "value_len" characters */ 3521 3522 - tv.v_type = VAR_STRING; 3523 - tv.vval.v_string = val; 3524 - 3525 - save_emsg = did_emsg; 3526 - did_emsg = FALSE; 3527 - set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); 3528 - err = did_emsg; 3529 - did_emsg |= save_emsg; 3530 - if (err) 3531 + if (ga_grow(&redir_ga, (int)len) == OK) 3532 + { 3533 + mch_memmove((char *)redir_ga.ga_data + redir_ga.ga_len, value, len); 3534 + redir_ga.ga_len += len; 3535 + } 3536 + else 3537 var_redir_stop(); 3538 - 3539 - vim_free(tv.vval.v_string); 3540 } 3541 3542 /* 3543 @@ -1016,8 +1016,19 @@ 3544 void 3545 var_redir_stop() 3546 { 3547 + typval_T tv; 3548 + 3549 if (redir_lval != NULL) 3550 { 3551 + /* Append the trailing NUL. */ 3552 + ga_append(&redir_ga, NUL); 3553 + 3554 + /* Assign the text to the variable. */ 3555 + tv.v_type = VAR_STRING; 3556 + tv.vval.v_string = redir_ga.ga_data; 3557 + set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)"."); 3558 + vim_free(tv.vval.v_string); 3559 + 3560 clear_lval(redir_lval); 3561 vim_free(redir_lval); 3562 redir_lval = NULL; 3563 @@ -2260,7 +2271,7 @@ 3402 3564 EMSG(_(e_letunexp)); 3403 3565 else … … 3408 3570 3409 3571 p = get_tv_string_chk(tv); 3410 @@ -2269,7 +22 71,7 @@3572 @@ -2269,7 +2280,7 @@ 3411 3573 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE); 3412 3574 if (s != NULL) … … 3417 3579 } 3418 3580 } 3419 @@ -2278,7 +228 0,7 @@3581 @@ -2278,7 +2289,7 @@ 3420 3582 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE); 3421 3583 arg_end = arg + 1; … … 3426 3588 } 3427 3589 3428 @@ -3125,7 +31 27,12 @@3590 @@ -3125,7 +3136,12 @@ 3429 3591 funcdict_T fudi; 3430 3592 … … 3440 3602 return; 3441 3603 3442 @@ -3177,9 +31 84,18 @@3604 @@ -3177,9 +3193,18 @@ 3443 3605 failed = TRUE; 3444 3606 break; … … 3459 3621 * occurred or an exception was thrown but not caught. 3460 3622 * get_func_tv() returned OK, so that the check for trailing 3461 @@ -3364,6 +338 0,8 @@3623 @@ -3364,6 +3389,8 @@ 3462 3624 hi = hash_find(ht, varname); 3463 3625 if (!HASHITEM_EMPTY(hi)) … … 3468 3630 return FAIL; 3469 3631 delete_var(ht, hi); 3470 @@ -4895,7 +49 13,7 @@3632 @@ -4895,7 +4922,7 @@ 3471 3633 { 3472 3634 if (list_append_tv(l, &item->li_tv) == FAIL) … … 3477 3639 } 3478 3640 item = item->li_next; 3479 @@ -5295,7 +53 13,7 @@3641 @@ -5295,7 +5322,7 @@ 3480 3642 EMSG2(_("E697: Missing end of List ']': %s"), *arg); 3481 3643 failret: … … 3486 3648 } 3487 3649 3488 @@ -5359,8 +53 77,8 @@3650 @@ -5359,8 +5386,8 @@ 3489 3651 list_unref(l) 3490 3652 list_T *l; … … 3497 3659 3498 3660 /* 3499 @@ -5368,14 +53 86,12 @@3661 @@ -5368,14 +5395,12 @@ 3500 3662 * Ignores the reference count. 3501 3663 */ … … 3515 3677 if (l->lv_used_prev == NULL) 3516 3678 first_list = l->lv_used_next; 3517 @@ -5388,7 +54 04,10 @@3679 @@ -5388,7 +5413,10 @@ 3518 3680 { 3519 3681 /* Remove the item before deleting it. */ … … 3527 3689 vim_free(l); 3528 3690 } 3529 @@ -5448,6 +54 67,8 @@3691 @@ -5448,6 +5476,8 @@ 3530 3692 { 3531 3693 listitem_T *item1, *item2; … … 3536 3698 return FALSE; 3537 3699 3538 @@ -5484,6 +55 05,8 @@3700 @@ -5484,6 +5514,8 @@ 3539 3701 dictitem_T *item2; 3540 3702 int todo; … … 3545 3707 return FALSE; 3546 3708 3547 @@ -5516,19 +55 39,29 @@3709 @@ -5516,19 +5548,29 @@ 3548 3710 { 3549 3711 char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN]; … … 3579 3741 case VAR_FUNC: 3580 3742 return (tv1->vval.v_string != NULL 3581 @@ -6059,6 +6 092,10 @@3743 @@ -6059,6 +6101,10 @@ 3582 3744 tabpage_T *tp; 3583 3745 #endif … … 3590 3752 * 1. Go through all accessible variables and mark all lists and dicts 3591 3753 * with copyID. 3592 @@ -6097,7 +61 34,10 @@3754 @@ -6097,7 +6143,10 @@ 3593 3755 for (dd = first_dict; dd != NULL; ) 3594 3756 if (dd->dv_copyID != copyID) … … 3602 3764 3603 3765 /* restart, next dict may also have been freed */ 3604 @@ -6114,7 +61 54,10 @@3766 @@ -6114,7 +6163,10 @@ 3605 3767 for (ll = first_list; ll != NULL; ) 3606 3768 if (ll->lv_copyID != copyID && ll->lv_watch == NULL) … … 3614 3776 3615 3777 /* restart, next list may also have been freed */ 3616 @@ -6207,11 +625 0,12 @@3778 @@ -6207,11 +6259,12 @@ 3617 3779 d = (dict_T *)alloc(sizeof(dict_T)); 3618 3780 if (d != NULL) … … 3628 3790 hash_init(&d->dv_hashtab); 3629 3791 d->dv_lock = 0; 3630 @@ -6229,8 +62 73,8 @@3792 @@ -6229,8 +6282,8 @@ 3631 3793 dict_unref(d) 3632 3794 dict_T *d; … … 3639 3801 3640 3802 /* 3641 @@ -6238,16 +62 82,14 @@3803 @@ -6238,16 +6291,14 @@ 3642 3804 * Ignores the reference count. 3643 3805 */ … … 3659 3821 if (d->dv_used_prev == NULL) 3660 3822 first_dict = d->dv_used_next; 3661 @@ -6267,7 +63 09,10 @@3823 @@ -6267,7 +6318,10 @@ 3662 3824 * something recursive causing trouble. */ 3663 3825 di = HI2DI(hi); … … 3671 3833 } 3672 3834 } 3673 @@ -6718,7 +67 63,7 @@3835 @@ -6718,7 +6772,7 @@ 3674 3836 EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg); 3675 3837 failret: … … 3680 3842 } 3681 3843 3682 @@ -7139,6 +71 84,7 @@3844 @@ -7139,6 +7193,7 @@ 3683 3845 {"setreg", 2, 3, f_setreg}, 3684 3846 {"settabwinvar", 4, 4, f_settabwinvar}, … … 3688 3850 {"sort", 1, 2, f_sort}, 3689 3851 {"soundfold", 1, 1, f_soundfold}, 3690 @@ -7595,8 +76 41,8 @@3852 @@ -7595,8 +7650,8 @@ 3691 3853 * Give an error message with a function name. Handle <SNR> things. 3692 3854 */ … … 3699 3861 { 3700 3862 char_u *p; 3701 @@ -7605,7 +76 51,7 @@3863 @@ -7605,7 +7660,7 @@ 3702 3864 p = concat_str((char_u *)"<SNR>", name + 3); 3703 3865 else … … 3708 3870 vim_free(p); 3709 3871 } 3710 @@ -8252,6 +8 298,12 @@3872 @@ -8252,6 +8307,12 @@ 3711 3873 EMSG(_("E785: complete() can only be used in Insert mode")); 3712 3874 return; … … 3721 3883 { 3722 3884 EMSG(_(e_invarg)); 3723 @@ -9173,25 +92 25,25 @@3885 @@ -9173,25 +9234,25 @@ 3724 3886 typval_T save_key; 3725 3887 int rem; … … 3751 3913 } 3752 3914 3753 @@ -9223,7 +92 75,7 @@3915 @@ -9223,7 +9284,7 @@ 3754 3916 { 3755 3917 --todo; … … 3760 3922 vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); 3761 3923 if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL 3762 @@ -9242,7 +9 294,7 @@3924 @@ -9242,7 +9303,7 @@ 3763 3925 { 3764 3926 for (li = l->lv_first; li != NULL; li = nli) … … 3769 3931 nli = li->li_next; 3770 3932 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL 3771 @@ -9598,7 +965 0,9 @@3933 @@ -9598,7 +9659,9 @@ 3772 3934 typval_T *argvars; 3773 3935 typval_T *rettv; … … 3780 3942 3781 3943 /* 3782 @@ -9792,6 +98 46,9 @@3944 @@ -9792,6 +9855,9 @@ 3783 3945 varnumber_T n; 3784 3946 int error = FALSE; … … 3790 3952 ++allow_keys; 3791 3953 if (argvars[0].v_type == VAR_UNKNOWN) 3792 @@ -9809,6 +98 66,10 @@3954 @@ -9809,6 +9875,10 @@ 3793 3955 --no_mapping; 3794 3956 --allow_keys; … … 3801 3963 if (IS_SPECIAL(n) || mod_mask != 0) 3802 3964 { 3803 @@ -9837,6 +9 898,53 @@3965 @@ -9837,6 +9907,53 @@ 3804 3966 temp[i++] = NUL; 3805 3967 rettv->v_type = VAR_STRING; … … 3855 4017 } 3856 4018 3857 @@ -10412,20 +1052 0,14 @@4019 @@ -10412,20 +10529,14 @@ 3858 4020 3859 4021 if (win != NULL && varname != NULL) … … 3882 4044 { 3883 4045 if (*varname == NUL) 3884 @@ -10438,6 +1054 0,10 @@4046 @@ -10438,6 +10549,10 @@ 3885 4047 if (v != NULL) 3886 4048 copy_tv(&v->di_tv, rettv); … … 3893 4055 3894 4056 --emsg_off; 3895 @@ -11312,14 +114 18,19 @@4057 @@ -11312,14 +11427,19 @@ 3896 4058 3897 4059 static int inputsecret_flag = 0; … … 3916 4078 char_u *prompt = get_tv_string_chk(&argvars[0]); 3917 4079 char_u *p = NULL; 3918 @@ -11369,10 +1148 0,10 @@4080 @@ -11369,10 +11489,10 @@ 3919 4081 if (defstr != NULL) 3920 4082 stuffReadbuffSpec(defstr); … … 3929 4091 3930 4092 rettv->vval.v_string = NULL; 3931 @@ -11404,6 +115 15,18 @@4093 @@ -11404,6 +11524,18 @@ 3932 4094 } 3933 4095 … … 3948 4110 */ 3949 4111 static void 3950 @@ -11443,7 +115 66,7 @@4112 @@ -11443,7 +11575,7 @@ 3951 4113 } 3952 4114 else … … 3957 4119 3958 4120 /* 3959 @@ -11471,6 +11 594,7 @@4121 @@ -11471,6 +11603,7 @@ 3960 4122 } 3961 4123 … … 3965 4127 msg_scroll = TRUE; 3966 4128 msg_clr_eos(); 3967 @@ -13250,7 +133 74,7 @@4129 @@ -13250,7 +13383,7 @@ 3968 4130 if (argvars[2].v_type != VAR_UNKNOWN) 3969 4131 EMSG2(_(e_toomanyarg), "remove()"); … … 3974 4136 key = get_tv_string_chk(&argvars[1]); 3975 4137 if (key != NULL) 3976 @@ -13270,7 +13 394,7 @@4138 @@ -13270,7 +13403,7 @@ 3977 4139 else if (argvars[0].v_type != VAR_LIST) 3978 4140 EMSG2(_(e_listdictarg), "remove()"); … … 3983 4145 int error = FALSE; 3984 4146 3985 @@ -14157,11 +142 81,7 @@4147 @@ -14157,11 +14290,7 @@ 3986 4148 typval_T *rettv; 3987 4149 { … … 3995 4157 typval_T *varp; 3996 4158 char_u nbuf[NUMBUFLEN]; 3997 @@ -14178,12 +14 298,7 @@4159 @@ -14178,12 +14307,7 @@ 3998 4160 if (buf != NULL && varname != NULL && varp != NULL) 3999 4161 { … … 4008 4170 if (*varname == '&') 4009 4171 { 4010 @@ -14210,11 +143 25,7 @@4172 @@ -14210,11 +14334,7 @@ 4011 4173 } 4012 4174 … … 4020 4182 } 4021 4183 4022 @@ -14582,6 +14 693,18 @@4184 @@ -14582,6 +14702,18 @@ 4023 4185 } 4024 4186 … … 4039 4201 */ 4040 4202 static void 4041 @@ -15950,6 +160 73,10 @@4203 @@ -15950,6 +16082,10 @@ 4042 4204 } 4043 4205 } … … 4050 4212 } 4051 4213 4052 @@ -16173,7 +1630 0,7 @@4214 @@ -16173,7 +16309,7 @@ 4053 4215 curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); 4054 4216 curwin->w_set_curswant = FALSE; … … 4059 4221 curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); 4060 4222 #endif 4061 @@ -16218,6 +163 45,7 @@4223 @@ -16218,6 +16354,7 @@ 4062 4224 #ifdef FEAT_VIRTUALEDIT 4063 4225 dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL); … … 4067 4229 4068 4230 dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL); 4069 @@ -16438,9 +165 66,12 @@4231 @@ -16438,9 +16575,12 @@ 4070 4232 long i = 0; 4071 4233 long n; … … 4083 4245 4084 4246 if (fnump != NULL) 4085 @@ -16466,8 +16 597,9 @@4247 @@ -16466,8 +16606,9 @@ 4086 4248 #ifdef FEAT_VIRTUALEDIT 4087 4249 n = list_find_nr(l, i, NULL); … … 4095 4257 4096 4258 return OK; 4097 @@ -17759,6 +17 891,13 @@4259 @@ -17759,6 +17900,13 @@ 4098 4260 } 4099 4261 else /* add a new variable */ … … 4109 4271 for (p = varname; *p != NUL; ++p) 4110 4272 if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) 4111 @@ -17792,7 +179 31,7 @@4273 @@ -17792,7 +17940,7 @@ 4112 4274 } 4113 4275 … … 4118 4280 */ 4119 4281 static int 4120 @@ -17814,6 +179 53,23 @@4282 @@ -17814,6 +17962,23 @@ 4121 4283 } 4122 4284 … … 4142 4304 * Also give an error message, using "name". 4143 4305 */ 4144 @@ -18396,12 +185 52,14 @@4306 @@ -18396,12 +18561,14 @@ 4145 4307 4146 4308 if (!eap->skip) … … 4159 4321 if (*arg == K_SPECIAL) 4160 4322 j = 3; 4161 @@ -18786,6 +189 44,7 @@4323 @@ -18786,6 +18953,7 @@ 4162 4324 if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL) 4163 4325 { … … 4167 4329 } 4168 4330 } 4169 @@ -18963,7 +191 22,8 @@4331 @@ -18963,7 +19131,8 @@ 4170 4332 else if (lead > 0) 4171 4333 { … … 4177 4339 /* It's "s:" or "<SID>" */ 4178 4340 if (current_SID <= 0) 4179 @@ -19618,6 +197 78,7 @@4341 @@ -19618,6 +19787,7 @@ 4180 4342 char_u *name; 4181 4343 #ifdef FEAT_PROFILE … … 4185 4347 4186 4348 /* If depth of calling is getting too high, don't execute the function */ 4187 @@ -19685,6 +198 46,7 @@4349 @@ -19685,6 +19855,7 @@ 4188 4350 v->di_tv.vval.v_list = &fc.l_varlist; 4189 4351 vim_memset(&fc.l_varlist, 0, sizeof(list_T)); … … 4193 4355 /* 4194 4356 * Set a:firstline to "firstline" and a:lastline to "lastline". 4195 @@ -19761,7 +199 23,7 @@4357 @@ -19761,7 +19932,7 @@ 4196 4358 if (p_verbose >= 14) 4197 4359 { … … 4202 4364 4203 4365 msg_puts((char_u *)"("); 4204 @@ -19773,8 +199 35,8 @@4366 @@ -19773,8 +19944,8 @@ 4205 4367 msg_outnum((long)argvars[i].vval.v_number); 4206 4368 else … … 4213 4375 vim_free(tofree); 4214 4376 } 4215 @@ -19796,7 +199 58,7 @@4377 @@ -19796,7 +19967,7 @@ 4216 4378 || (fc.caller != NULL && &fc.caller->func->uf_profiling)) 4217 4379 { … … 4222 4384 } 4223 4385 script_prof_save(&wait_start); 4224 @@ -19826,14 +199 88,14 @@4386 @@ -19826,14 +19997,14 @@ 4225 4387 if (do_profiling == PROF_YES && (fp->uf_profiling 4226 4388 || (fc.caller != NULL && &fc.caller->func->uf_profiling))) … … 4243 4405 } 4244 4406 #endif 4245 @@ -19852,13 +200 14,13 @@4407 @@ -19852,13 +20023,13 @@ 4246 4408 else 4247 4409 { … … 4261 4423 diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c 4262 4424 --- vim70.orig/src/ex_cmds2.c 2006-04-17 03:19:07.000000000 -0700 4263 +++ vim70/src/ex_cmds2.c 2006-12-05 19:57:56.000000000 -0800 4264 @@ -3648,13 +3648,13 @@ 4425 +++ vim70/src/ex_cmds2.c 2007-01-23 17:15:23.000000000 -0800 4426 @@ -2811,6 +2811,17 @@ 4427 } 4428 4429 #ifdef FEAT_AUTOCMD 4430 + /* 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_EVAL 4435 + return aborting() ? FAIL : OK; 4436 +# else 4437 + return OK; 4438 +# endif 4439 + 4440 + /* Apply SourcePre autocommands, they may get the file. */ 4441 apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf); 4442 #endif 4443 4444 @@ -3648,13 +3659,13 @@ 4265 4445 * Return FALSE when not sourcing a file. 4266 4446 */ … … 4282 4462 diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c 4283 4463 --- vim70.orig/src/ex_cmds.c 2006-04-22 11:56:56.000000000 -0700 4284 +++ vim70/src/ex_cmds.c 200 6-12-05 19:58:00.000000000 -08004464 +++ vim70/src/ex_cmds.c 2007-01-23 17:14:59.000000000 -0800 4285 4465 @@ -95,7 +95,10 @@ 4286 4466 _("<%s>%s%s %d, Hex %02x, Octal %03o"), … … 4393 4573 diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h 4394 4574 --- vim70.orig/src/ex_cmds.h 2006-04-07 02:44:46.000000000 -0700 4395 +++ vim70/src/ex_cmds.h 200 6-12-05 19:57:46.000000000 -08004575 +++ vim70/src/ex_cmds.h 2007-01-23 17:14:49.000000000 -0800 4396 4576 @@ -262,7 +262,7 @@ 4397 4577 EX(CMD_comclear, "comclear", ex_comclear, … … 4405 4585 diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c 4406 4586 --- vim70.orig/src/ex_docmd.c 2006-05-05 09:33:19.000000000 -0700 4407 +++ vim70/src/ex_docmd.c 200 6-12-05 19:58:21.000000000 -08004587 +++ vim70/src/ex_docmd.c 2007-01-23 17:15:11.000000000 -0800 4408 4588 @@ -58,9 +58,9 @@ 4409 4589 #endif … … 4868 5048 diff -Naur vim70.orig/src/ex_eval.c vim70/src/ex_eval.c 4869 5049 --- vim70.orig/src/ex_eval.c 2006-04-22 12:22:27.000000000 -0700 4870 +++ vim70/src/ex_eval.c 200 6-12-05 19:58:21.000000000 -08005050 +++ vim70/src/ex_eval.c 2007-01-23 17:15:11.000000000 -0800 4871 5051 @@ -340,7 +340,7 @@ 4872 5052 … … 4894 5074 diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c 4895 5075 --- vim70.orig/src/ex_getln.c 2006-04-30 08:32:01.000000000 -0700 4896 +++ vim70/src/ex_getln.c 200 6-12-05 19:58:12.000000000 -08005076 +++ vim70/src/ex_getln.c 2007-01-23 17:15:10.000000000 -0800 4897 5077 @@ -34,7 +34,7 @@ 4898 5078 int xp_context; /* type of expansion */ … … 5044 5224 diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c 5045 5225 --- vim70.orig/src/fileio.c 2006-04-30 08:28:57.000000000 -0700 5046 +++ vim70/src/fileio.c 200 6-12-05 19:58:02.000000000 -08005226 +++ vim70/src/fileio.c 2007-01-23 17:15:23.000000000 -0800 5047 5227 @@ -316,6 +316,9 @@ 5048 5228 * display the line. */ … … 5055 5235 * For Unix: Use the short file name whenever possible. 5056 5236 * Avoids problems with networks and when directory names are changed. 5237 @@ -6151,8 +6154,8 @@ 5238 if (retval != FAIL) 5239 { 5240 curbuf = frombuf; 5241 - while (!bufempty()) 5242 - if (ml_delete(curbuf->b_ml.ml_line_count, FALSE) == FAIL) 5243 + for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum) 5244 + if (ml_delete(lnum, FALSE) == FAIL) 5245 { 5246 /* Oops! We could try putting back the saved lines, but that 5247 * might fail again... */ 5057 5248 @@ -6450,17 +6453,10 @@ 5058 5249 int old_ro = buf->b_p_ro; … … 5096 5287 {"InsertEnter", EVENT_INSERTENTER}, 5097 5288 {"InsertLeave", EVENT_INSERTLEAVE}, 5098 @@ -8088,6 +8080,7 @@ 5289 @@ -7003,6 +6995,7 @@ 5290 {"ShellCmdPost", EVENT_SHELLCMDPOST}, 5291 {"ShellFilterPost", EVENT_SHELLFILTERPOST}, 5292 {"SourcePre", EVENT_SOURCEPRE}, 5293 + {"SourceCmd", EVENT_SOURCECMD}, 5294 {"SpellFileMissing",EVENT_SPELLFILEMISSING}, 5295 {"StdinReadPost", EVENT_STDINREADPOST}, 5296 {"StdinReadPre", EVENT_STDINREADPRE}, 5297 @@ -8088,6 +8081,7 @@ 5099 5298 * Search a window for the current buffer. Save the cursor position and 5100 5299 * screen offset. … … 5104 5303 void 5105 5304 aucmd_prepbuf(aco, buf) 5106 @@ -8151,6 +814 4,7 @@5305 @@ -8151,6 +8145,7 @@ 5107 5306 /* 5108 5307 * Cleanup after executing autocommands for a (hidden) buffer. … … 5112 5311 void 5113 5312 aucmd_restbuf(aco) 5114 @@ -8295,7 +82 89,11 @@5313 @@ -8295,7 +8290,11 @@ 5115 5314 { 5116 5315 int state; … … 5125 5324 state = get_real_state(); 5126 5325 if (state == NORMAL_BUSY || (state & INSERT) != 0) 5127 @@ -9063,8 +906 1,38 @@5326 @@ -9063,8 +9062,38 @@ 5128 5327 return retval; 5129 5328 } … … 5166 5365 diff -Naur vim70.orig/src/fold.c vim70/src/fold.c 5167 5366 --- vim70.orig/src/fold.c 2006-04-22 12:35:56.000000000 -0700 5168 +++ vim70/src/fold.c 200 6-12-05 19:58:10.000000000 -08005367 +++ vim70/src/fold.c 2007-01-23 17:15:09.000000000 -0800 5169 5368 @@ -2971,7 +2971,11 @@ 5170 5369 else … … 5181 5380 diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c 5182 5381 --- vim70.orig/src/getchar.c 2006-05-03 10:29:21.000000000 -0700 5183 +++ vim70/src/getchar.c 200 6-12-05 19:58:33.000000000 -08005382 +++ vim70/src/getchar.c 2007-01-23 17:15:12.000000000 -0800 5184 5383 @@ -76,7 +76,7 @@ 5185 5384 */ … … 5316 5515 diff -Naur vim70.orig/src/globals.h vim70/src/globals.h 5317 5516 --- vim70.orig/src/globals.h 2006-04-30 06:16:23.000000000 -0700 5318 +++ vim70/src/globals.h 200 6-12-05 19:58:06.000000000 -08005517 +++ vim70/src/globals.h 2007-01-23 17:15:05.000000000 -0800 5319 5518 @@ -166,6 +166,7 @@ 5320 5519 EXTERN int emsg_off INIT(= 0); /* don't display errors for now, … … 5356 5555 diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c 5357 5556 --- vim70.orig/src/gui_at_fs.c 2005-07-09 04:30:17.000000000 -0700 5358 +++ vim70/src/gui_at_fs.c 200 6-12-05 19:57:43.000000000 -08005557 +++ vim70/src/gui_at_fs.c 2007-01-23 17:14:47.000000000 -0800 5359 5558 @@ -1861,27 +1861,27 @@ 5360 5559 XtPointer pnew; … … 5472 5671 diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c 5473 5672 --- vim70.orig/src/gui_beval.c 2006-05-04 12:29:51.000000000 -0700 5474 +++ vim70/src/gui_beval.c 200 6-12-05 19:57:56.000000000 -08005673 +++ vim70/src/gui_beval.c 2007-01-23 17:14:55.000000000 -0800 5475 5674 @@ -926,7 +926,7 @@ 5476 5675 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \ … … 5511 5710 diff -Naur vim70.orig/src/gui.c vim70/src/gui.c 5512 5711 --- vim70.orig/src/gui.c 2006-05-03 04:00:59.000000000 -0700 5513 +++ vim70/src/gui.c 200 6-12-05 19:58:06.000000000 -08005712 +++ vim70/src/gui.c 2007-01-23 17:15:05.000000000 -0800 5514 5713 @@ -187,9 +187,10 @@ 5515 5714 #endif … … 5614 5813 diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c 5615 5814 --- vim70.orig/src/gui_gtk.c 2006-05-05 04:52:52.000000000 -0700 5616 +++ vim70/src/gui_gtk.c 200 6-12-05 19:58:10.000000000 -08005815 +++ vim70/src/gui_gtk.c 2007-01-23 17:15:08.000000000 -0800 5617 5816 @@ -957,15 +957,15 @@ 5618 5817 get_menu_position(vimmenu_T *menu) … … 5712 5911 diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c 5713 5912 --- vim70.orig/src/gui_gtk_x11.c 2006-05-04 23:58:59.000000000 -0700 5714 +++ vim70/src/gui_gtk_x11.c 200 6-12-05 19:57:56.000000000 -08005913 +++ vim70/src/gui_gtk_x11.c 2007-01-23 17:14:55.000000000 -0800 5715 5914 @@ -3233,12 +3233,12 @@ 5716 5915 on_select_tab( … … 5777 5976 diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c 5778 5977 --- vim70.orig/src/gui_xmebw.c 2006-04-30 08:32:32.000000000 -0700 5779 +++ vim70/src/gui_xmebw.c 200 6-12-05 19:58:10.000000000 -08005978 +++ vim70/src/gui_xmebw.c 2007-01-23 17:15:08.000000000 -0800 5780 5979 @@ -47,13 +47,13 @@ 5781 5980 #include "gui_xmebwp.h" … … 5906 6105 diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c 5907 6106 --- vim70.orig/src/hardcopy.c 2006-05-04 03:09:58.000000000 -0700 5908 +++ vim70/src/hardcopy.c 200 6-12-05 19:57:56.000000000 -08006107 +++ vim70/src/hardcopy.c 2007-01-23 17:14:55.000000000 -0800 5909 6108 @@ -1794,29 +1794,27 @@ 5910 6109 static int … … 6009 6208 diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c 6010 6209 --- vim70.orig/src/if_cscope.c 2006-04-18 01:54:15.000000000 -0700 6011 +++ vim70/src/if_cscope.c 2006-12-05 19:58:12.000000000 -0800 6012 @@ -989,8 +989,7 @@ 6210 +++ vim70/src/if_cscope.c 2007-01-23 17:15:15.000000000 -0800 6211 @@ -627,10 +627,11 @@ 6212 * If the database is out of date, or there's some other problem, 6213 * cscope will output error messages before the number-of-lines output. 6214 * Display/discard any output that doesn't match what we want. 6215 + * Accept "\S*cscope: X lines", also matches "mlcscope". 6216 */ 6217 if ((stok = strtok(buf, (const char *)" ")) == NULL) 6218 continue; 6219 - if (strcmp((const char *)stok, "cscope:")) 6220 + if (strstr((const char *)stok, "cscope:") == NULL) 6221 continue; 6222 6223 if ((stok = strtok(NULL, (const char *)" ")) == NULL) 6224 @@ -989,8 +990,7 @@ 6013 6225 { 6014 6226 int i; … … 6020 6232 char cmdletter; 6021 6233 char *qfpos; 6022 @@ -1009,7 +100 8,7 @@6234 @@ -1009,7 +1009,7 @@ 6023 6235 totmatches = 0; 6024 6236 for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) … … 6029 6241 6030 6242 /* send cmd to cscope */ 6031 @@ -1101,38 +110 0,44 @@6243 @@ -1101,38 +1101,44 @@ 6032 6244 if (qfpos != NULL && *qfpos != '0' && totmatches > 0) 6033 6245 { … … 6096 6308 mch_remove(tmp); 6097 6309 vim_free(tmp); 6098 @@ -1141,6 +114 6,9 @@6310 @@ -1141,6 +1147,9 @@ 6099 6311 else 6100 6312 #endif /* FEAT_QUICKFIX */ … … 6106 6318 cs_fill_results((char *)pat, totmatches, nummatches, &matches, 6107 6319 &contexts, &matched); 6108 @@ -1721,7 +17 29,7 @@6320 @@ -1721,7 +1730,7 @@ 6109 6321 continue; 6110 6322 … … 6115 6327 6116 6328 if (strcmp(cntx, "<global>")==0) 6117 @@ -1729,7 +173 7,7 @@6329 @@ -1729,7 +1738,7 @@ 6118 6330 else 6119 6331 sprintf(context, "<<%s>>", cntx); … … 6126 6338 diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs 6127 6339 --- vim70.orig/src/if_perl.xs 2006-03-06 10:57:16.000000000 -0800 6128 +++ vim70/src/if_perl.xs 200 6-12-05 19:57:54.000000000 -08006340 +++ vim70/src/if_perl.xs 2007-01-23 17:14:52.000000000 -0800 6129 6341 @@ -155,8 +155,8 @@ 6130 6342 static int (*perl_run)(PerlInterpreter*); … … 6241 6453 diff -Naur vim70.orig/src/if_python.c vim70/src/if_python.c 6242 6454 --- vim70.orig/src/if_python.c 2006-04-30 08:31:36.000000000 -0700 6243 +++ vim70/src/if_python.c 200 6-12-05 19:58:04.000000000 -08006455 +++ vim70/src/if_python.c 2007-01-23 17:15:02.000000000 -0800 6244 6456 @@ -1463,7 +1463,7 @@ 6245 6457 if (this->buf && this->buf != INVALID_BUFFER_VALUE) … … 6280 6492 diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c 6281 6493 --- vim70.orig/src/if_ruby.c 2006-04-30 08:37:52.000000000 -0700 6282 +++ vim70/src/if_ruby.c 200 6-12-05 19:57:54.000000000 -08006494 +++ vim70/src/if_ruby.c 2007-01-23 17:14:52.000000000 -0800 6283 6495 @@ -643,11 +643,14 @@ 6284 6496 … … 6395 6607 diff -Naur vim70.orig/src/macros.h vim70/src/macros.h 6396 6608 --- vim70.orig/src/macros.h 2006-03-01 04:01:10.000000000 -0800 6397 +++ vim70/src/macros.h 200 6-12-05 19:58:00.000000000 -08006609 +++ vim70/src/macros.h 2007-01-23 17:14:57.000000000 -0800 6398 6610 @@ -276,3 +276,9 @@ 6399 6611 # define MB_CHARLEN(p) STRLEN(p) … … 6408 6620 diff -Naur vim70.orig/src/main.c vim70/src/main.c 6409 6621 --- vim70.orig/src/main.c 2006-05-03 10:36:44.000000000 -0700 6410 +++ vim70/src/main.c 200 6-12-05 19:58:11.000000000 -08006622 +++ vim70/src/main.c 2007-01-23 17:15:10.000000000 -0800 6411 6623 @@ -564,7 +564,11 @@ 6412 6624 */ … … 6602 6814 diff -Naur vim70.orig/src/Makefile vim70/src/Makefile 6603 6815 --- vim70.orig/src/Makefile 2006-05-07 06:25:27.000000000 -0700 6604 +++ vim70/src/Makefile 200 6-12-05 19:57:59.000000000 -08006816 +++ vim70/src/Makefile 2007-01-23 17:14:56.000000000 -0800 6605 6817 @@ -2177,6 +2177,7 @@ 6606 6818 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . … … 6622 6834 diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c 6623 6835 --- vim70.orig/src/mbyte.c 2006-04-30 04:51:01.000000000 -0700 6624 +++ vim70/src/mbyte.c 200 6-12-05 19:58:39.000000000 -08006836 +++ vim70/src/mbyte.c 2007-01-23 17:15:12.000000000 -0800 6625 6837 @@ -311,7 +311,11 @@ 6626 6838 … … 6719 6931 diff -Naur vim70.orig/src/memfile.c vim70/src/memfile.c 6720 6932 --- vim70.orig/src/memfile.c 2006-03-06 00:59:15.000000000 -0800 6721 +++ vim70/src/memfile.c 200 6-12-05 19:58:11.000000000 -08006933 +++ vim70/src/memfile.c 2007-01-23 17:15:10.000000000 -0800 6722 6934 @@ -517,7 +517,7 @@ 6723 6935 mf_ins_free(mfp, hp); /* put *hp in the free list */ … … 6776 6988 diff -Naur vim70.orig/src/memline.c vim70/src/memline.c 6777 6989 --- vim70.orig/src/memline.c 2006-04-20 14:00:21.000000000 -0700 6778 +++ vim70/src/memline.c 200 6-12-05 19:58:12.000000000 -08006990 +++ vim70/src/memline.c 2007-01-23 17:15:12.000000000 -0800 6779 6991 @@ -215,7 +215,7 @@ 6780 6992 #define ML_FLUSH 0x02 /* flush locked block */ … … 6807 7019 else 6808 7020 set_b0_dir_flag(b0p, buf); 6809 @@ -1325, 6 +1325,7@@7021 @@ -1325,7 +1325,11 @@ 6810 7022 mf_put(mfp, hp, FALSE, FALSE); 6811 7023 mf_close(mfp, FALSE); /* will also vim_free(mfp->mf_fname) */ 6812 7024 } 6813 + vim_free(buf->b_ml.ml_stack); 6814 vim_free(buf); 7025 - vim_free(buf); 7026 + if (buf != NULL) 7027 + { 7028 + vim_free(buf->b_ml.ml_stack); 7029 + vim_free(buf); 7030 + } 6815 7031 if (serious_error && called_from_main) 6816 7032 ml_close(curbuf, TRUE); 6817 @@ -1633,6 +1634,7 @@ 7033 #ifdef FEAT_AUTOCMD 7034 @@ -1633,6 +1637,7 @@ 6818 7035 int fd; 6819 7036 struct block0 b0; … … 6823 7040 char_u uname[B0_UNAME_SIZE]; 6824 7041 #endif 6825 @@ -1652,8 +165 4,11 @@7042 @@ -1652,8 +1657,11 @@ 6826 7043 #endif 6827 7044 MSG_PUTS(_(" dated: ")); … … 6837 7054 6838 7055 /* 6839 @@ -3652,6 +36 57,7 @@7056 @@ -3652,6 +3660,7 @@ 6840 7057 { 6841 7058 struct stat st; … … 6845 7062 ++no_wait_return; 6846 7063 (void)EMSG(_("E325: ATTENTION")); 6847 @@ -3666,7 +367 2,11 @@7064 @@ -3666,7 +3675,11 @@ 6848 7065 { 6849 7066 MSG_PUTS(_(" dated: ")); … … 6860 7077 diff -Naur vim70.orig/src/menu.c vim70/src/menu.c 6861 7078 --- vim70.orig/src/menu.c 2006-05-03 10:30:48.000000000 -0700 6862 +++ vim70/src/menu.c 200 6-12-05 19:58:28.000000000 -08007079 +++ vim70/src/menu.c 2007-01-23 17:15:12.000000000 -0800 6863 7080 @@ -511,6 +511,14 @@ 6864 7081 * name (without mnemonic and accelerator text). */ … … 6946 7163 diff -Naur vim70.orig/src/message.c vim70/src/message.c 6947 7164 --- vim70.orig/src/message.c 2006-05-06 13:07:37.000000000 -0700 6948 +++ vim70/src/message.c 200 6-12-05 19:58:06.000000000 -08007165 +++ vim70/src/message.c 2007-01-23 17:15:17.000000000 -0800 6949 7166 @@ -53,7 +53,6 @@ 6950 7167 static struct msg_hist *first_msg_hist = NULL; … … 6955 7172 /* 6956 7173 * When writing messages to the screen, there are many different situations. 6957 @@ -1925,7 +1924,8 @@ 7174 @@ -1557,7 +1556,7 @@ 7175 int c_extra = 0; 7176 char_u *p_extra = NULL; /* init to make SASC shut up */ 7177 int n; 7178 - int attr= 0; 7179 + int attr = 0; 7180 char_u *trail = NULL; 7181 #ifdef FEAT_MBYTE 7182 int l; 7183 @@ -1582,7 +1581,7 @@ 7184 7185 while (!got_int) 7186 { 7187 - if (n_extra) 7188 + if (n_extra > 0) 7189 { 7190 --n_extra; 7191 if (c_extra) 7192 @@ -1596,7 +1595,7 @@ 7193 col += (*mb_ptr2cells)(s); 7194 mch_memmove(buf, s, (size_t)l); 7195 buf[l] = NUL; 7196 - msg_puts_attr(buf, attr); 7197 + msg_puts(buf); 7198 s += l; 7199 continue; 7200 } 7201 @@ -1636,6 +1635,9 @@ 7202 p_extra = transchar_byte(c); 7203 c_extra = NUL; 7204 c = *p_extra++; 7205 + /* Use special coloring to be able to distinguish <hex> from 7206 + * the same in plain text. */ 7207 + attr = hl_attr(HLF_8); 7208 } 7209 else if (c == ' ' && trail != NULL && s > trail) 7210 { 7211 @@ -1925,7 +1927,8 @@ 6958 7212 * If screen is completely filled and 'more' is set then wait 6959 7213 * for a character. … … 6965 7219 { 6966 7220 #ifdef FEAT_CON_DIALOG 6967 @@ -4123,8 +412 3,6 @@7221 @@ -4123,8 +4126,6 @@ 6968 7222 case 'c': 6969 7223 case 's': … … 6974 7228 switch (fmt_spec) 6975 7229 { 6976 @@ -4175,15 +417 3,16 @@7230 @@ -4175,15 +4176,16 @@ 6977 7231 str_arg_l = 0; 6978 7232 else … … 6999 7253 diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c 7000 7254 --- vim70.orig/src/misc1.c 2006-04-30 08:30:02.000000000 -0700 7001 +++ vim70/src/misc1.c 200 6-12-05 19:58:10.000000000 -08007255 +++ vim70/src/misc1.c 2007-01-23 17:15:07.000000000 -0800 7002 7256 @@ -1761,15 +1761,13 @@ 7003 7257 * Add column offset for 'number', 'foldcolumn', etc. … … 7114 7368 diff -Naur vim70.orig/src/misc2.c vim70/src/misc2.c 7115 7369 --- vim70.orig/src/misc2.c 2006-05-04 05:12:38.000000000 -0700 7116 +++ vim70/src/misc2.c 200 6-12-05 19:58:04.000000000 -08007370 +++ vim70/src/misc2.c 2007-01-23 17:15:02.000000000 -0800 7117 7371 @@ -1229,6 +1229,94 @@ 7118 7372 return escaped_string; … … 7212 7466 diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c 7213 7467 --- vim70.orig/src/netbeans.c 2006-04-22 11:00:05.000000000 -0700 7214 +++ vim70/src/netbeans.c 200 6-12-05 19:58:11.000000000 -08007468 +++ vim70/src/netbeans.c 2007-01-23 17:15:10.000000000 -0800 7215 7469 @@ -61,7 +61,7 @@ 7216 7470 … … 7421 7675 diff -Naur vim70.orig/src/normal.c vim70/src/normal.c 7422 7676 --- vim70.orig/src/normal.c 2006-04-29 06:11:18.000000000 -0700 7423 +++ vim70/src/normal.c 200 6-12-05 19:58:33.000000000 -08007677 +++ vim70/src/normal.c 2007-01-23 17:15:12.000000000 -0800 7424 7678 @@ -651,9 +651,8 @@ 7425 7679 /* Fake a "c"hange command. When "restart_edit" is set (e.g., because … … 7520 7774 diff -Naur vim70.orig/src/ops.c vim70/src/ops.c 7521 7775 --- vim70.orig/src/ops.c 2006-04-30 08:13:44.000000000 -0700 7522 +++ vim70/src/ops.c 200 6-12-05 19:58:11.000000000 -08007776 +++ vim70/src/ops.c 2007-01-23 17:15:10.000000000 -0800 7523 7777 @@ -95,8 +95,8 @@ 7524 7778 static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp)); … … 7720 7974 diff -Naur vim70.orig/src/option.c vim70/src/option.c 7721 7975 --- vim70.orig/src/option.c 2006-05-03 10:32:28.000000000 -0700 7722 +++ vim70/src/option.c 200 6-12-05 19:58:09.000000000 -08007976 +++ vim70/src/option.c 2007-01-23 17:15:07.000000000 -0800 7723 7977 @@ -2294,7 +2294,7 @@ 7724 7978 {(char_u *)0L, (char_u *)0L} … … 7836 8090 diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c 7837 8091 --- vim70.orig/src/os_unix.c 2006-05-01 01:13:15.000000000 -0700 7838 +++ vim70/src/os_unix.c 200 6-12-05 19:57:56.000000000 -08008092 +++ vim70/src/os_unix.c 2007-01-23 17:14:55.000000000 -0800 7839 8093 @@ -3934,7 +3934,7 @@ 7840 8094 { … … 7895 8149 diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c 7896 8150 --- vim70.orig/src/popupmnu.c 2006-04-20 13:18:37.000000000 -0700 7897 +++ vim70/src/popupmnu.c 200 6-12-05 19:57:54.000000000 -08008151 +++ vim70/src/popupmnu.c 2007-01-23 17:14:53.000000000 -0800 7898 8152 @@ -552,6 +552,9 @@ 7899 8153 { … … 7908 8162 diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro 7909 8163 --- vim70.orig/src/proto/buffer.pro 2006-05-07 06:08:29.000000000 -0700 7910 +++ vim70/src/proto/buffer.pro 200 6-12-05 19:58:00.000000000 -08008164 +++ vim70/src/proto/buffer.pro 2007-01-23 17:14:57.000000000 -0800 7911 8165 @@ -10,6 +10,7 @@ 7912 8166 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit)); … … 7919 8173 diff -Naur vim70.orig/src/proto/eval.pro vim70/src/proto/eval.pro 7920 8174 --- vim70.orig/src/proto/eval.pro 2006-05-07 06:08:33.000000000 -0700 7921 +++ vim70/src/proto/eval.pro 200 6-12-05 19:58:07.000000000 -08008175 +++ vim70/src/proto/eval.pro 2007-01-23 17:15:06.000000000 -0800 7922 8176 @@ -44,7 +44,7 @@ 7923 8177 extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx)); … … 7931 8185 diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro 7932 8186 --- vim70.orig/src/proto/menu.pro 2006-05-07 06:08:51.000000000 -0700 7933 +++ vim70/src/proto/menu.pro 200 6-12-05 19:57:54.000000000 -08008187 +++ vim70/src/proto/menu.pro 2007-01-23 17:14:53.000000000 -0800 7934 8188 @@ -10,6 +10,7 @@ 7935 8189 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu)); … … 7942 8196 diff -Naur vim70.orig/src/proto/misc2.pro vim70/src/proto/misc2.pro 7943 8197 --- vim70.orig/src/proto/misc2.pro 2006-05-07 06:08:54.000000000 -0700 7944 +++ vim70/src/proto/misc2.pro 200 6-12-05 19:58:04.000000000 -08008198 +++ vim70/src/proto/misc2.pro 2007-01-23 17:15:02.000000000 -0800 7945 8199 @@ -29,6 +29,7 @@ 7946 8200 extern char_u *vim_strnsave __ARGS((char_u *string, int len)); … … 7953 8207 diff -Naur vim70.orig/src/proto/ops.pro vim70/src/proto/ops.pro 7954 8208 --- vim70.orig/src/proto/ops.pro 2006-05-07 06:08:58.000000000 -0700 7955 +++ vim70/src/proto/ops.pro 200 6-12-05 19:58:11.000000000 -08008209 +++ vim70/src/proto/ops.pro 2007-01-23 17:15:10.000000000 -0800 7956 8210 @@ -17,10 +17,10 @@ 7957 8211 extern void put_register __ARGS((int name, void *reg)); … … 7969 8223 diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro 7970 8224 --- vim70.orig/src/proto/undo.pro 2006-05-07 06:09:11.000000000 -0700 7971 +++ vim70/src/proto/undo.pro 200 6-12-05 19:57:47.000000000 -08008225 +++ vim70/src/proto/undo.pro 2007-01-23 17:14:49.000000000 -0800 7972 8226 @@ -4,6 +4,7 @@ 7973 8227 extern int u_savesub __ARGS((linenr_T lnum)); … … 7980 8234 diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c 7981 8235 --- vim70.orig/src/quickfix.c 2006-05-03 00:47:42.000000000 -0700 7982 +++ vim70/src/quickfix.c 200 6-12-05 19:58:09.000000000 -08008236 +++ vim70/src/quickfix.c 2007-01-23 17:15:07.000000000 -0800 7983 8237 @@ -500,8 +500,6 @@ 7984 8238 { … … 8235 8489 diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c 8236 8490 --- vim70.orig/src/regexp.c 2006-04-30 08:31:50.000000000 -0700 8237 +++ vim70/src/regexp.c 200 6-12-05 19:58:09.000000000 -08008491 +++ vim70/src/regexp.c 2007-01-23 17:15:07.000000000 -0800 8238 8492 @@ -3777,8 +3777,8 @@ 8239 8493 … … 8372 8626 diff -Naur vim70.orig/src/screen.c vim70/src/screen.c 8373 8627 --- vim70.orig/src/screen.c 2006-05-05 03:13:55.000000000 -0700 8374 +++ vim70/src/screen.c 200 6-12-05 19:58:12.000000000 -08008628 +++ vim70/src/screen.c 2007-01-23 17:15:11.000000000 -0800 8375 8629 @@ -455,6 +455,7 @@ 8376 8630 && curwin->w_topline == curwin->w_lines[0].wl_lnum) … … 8556 8810 diff -Naur vim70.orig/src/search.c vim70/src/search.c 8557 8811 --- vim70.orig/src/search.c 2006-05-05 05:12:13.000000000 -0700 8558 +++ vim70/src/search.c 2006-12-05 19:58:06.000000000 -0800 8559 @@ -1259,7 +1259,7 @@ 8812 +++ vim70/src/search.c 2007-01-23 17:15:26.000000000 -0800 8813 @@ -812,7 +812,11 @@ 8814 #ifdef FEAT_MBYTE 8815 if (has_mbyte) 8816 { 8817 - ptr = ml_get_buf(buf, pos->lnum, FALSE); 8818 + /* 'e' offset may put us just below the last line */ 8819 + if (pos->lnum > buf->b_ml.ml_line_count) 8820 + ptr = (char_u *)""; 8821 + else 8822 + ptr = ml_get_buf(buf, pos->lnum, FALSE); 8823 pos->col -= (*mb_head_off)(ptr, ptr + pos->col); 8824 } 8825 #endif 8826 @@ -1259,7 +1263,7 @@ 8560 8827 /* 8561 8828 * Add character and/or line offset … … 8566 8833 if (spats[0].off.line) /* Add the offset to the line number. */ 8567 8834 { 8568 @@ -4688,6 +46 88,7 @@8835 @@ -4688,6 +4692,7 @@ 8569 8836 #ifdef FEAT_INS_EXPAND 8570 8837 if (action == ACTION_EXPAND) … … 8574 8841 _("Scanning included file: %s"), 8575 8842 (char *)new_fname); 8576 @@ -4826,15 +48 27,20 @@8843 @@ -4826,15 +4831,20 @@ 8577 8844 8578 8845 if ((compl_cont_status & CONT_ADDING) && i == compl_length) … … 8602 8869 8603 8870 /* we read a line, set "already" to check this "line" later 8604 @@ -4871,7 +48 77,7 @@8871 @@ -4871,7 +4881,7 @@ 8605 8872 goto exit_matched; 8606 8873 } … … 8613 8880 diff -Naur vim70.orig/src/spell.c vim70/src/spell.c 8614 8881 --- vim70.orig/src/spell.c 2006-05-05 00:49:58.000000000 -0700 8615 +++ vim70/src/spell.c 200 6-12-05 19:58:02.000000000 -08008882 +++ vim70/src/spell.c 2007-01-23 17:15:01.000000000 -0800 8616 8883 @@ -1483,7 +1483,7 @@ 8617 8884 else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND … … 8944 9211 diff -Naur vim70.orig/src/structs.h vim70/src/structs.h 8945 9212 --- vim70.orig/src/structs.h 2006-04-09 10:57:46.000000000 -0700 8946 +++ vim70/src/structs.h 200 6-12-05 19:57:54.000000000 -08009213 +++ vim70/src/structs.h 2007-01-23 17:14:52.000000000 -0800 8947 9214 @@ -2213,18 +2213,20 @@ 8948 9215 … … 8970 9237 diff -Naur vim70.orig/src/syntax.c vim70/src/syntax.c 8971 9238 --- vim70.orig/src/syntax.c 2006-04-26 05:49:45.000000000 -0700 8972 +++ vim70/src/syntax.c 200 6-12-05 19:58:10.000000000 -08009239 +++ vim70/src/syntax.c 2007-01-23 17:15:09.000000000 -0800 8973 9240 @@ -977,6 +977,7 @@ 8974 9241 { … … 9074 9341 diff -Naur vim70.orig/src/tag.c vim70/src/tag.c 9075 9342 --- vim70.orig/src/tag.c 2006-04-27 06:11:21.000000000 -0700 9076 +++ vim70/src/tag.c 200 6-12-05 19:58:07.000000000 -08009343 +++ vim70/src/tag.c 2007-01-23 17:15:06.000000000 -0800 9077 9344 @@ -911,7 +911,7 @@ 9078 9345 … … 9116 9383 diff -Naur vim70.orig/src/term.c vim70/src/term.c 9117 9384 --- vim70.orig/src/term.c 2006-05-03 10:34:57.000000000 -0700 9118 +++ vim70/src/term.c 200 6-12-05 19:58:10.000000000 -08009385 +++ vim70/src/term.c 2007-01-23 17:15:08.000000000 -0800 9119 9386 @@ -3137,25 +3137,32 @@ 9120 9387 screenalloc(FALSE); … … 9180 9447 diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in 9181 9448 --- vim70.orig/src/testdir/test56.in 2005-05-18 08:37:37.000000000 -0700 9182 +++ vim70/src/testdir/test56.in 200 6-12-05 19:58:00.000000000 -08009449 +++ vim70/src/testdir/test56.in 2007-01-23 17:14:57.000000000 -0800 9183 9450 @@ -3,7 +3,7 @@ 9184 9451 STARTTEST … … 9192 9459 diff -Naur vim70.orig/src/ui.c vim70/src/ui.c 9193 9460 --- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800 9194 +++ vim70/src/ui.c 200 6-12-05 19:57:56.000000000 -08009461 +++ vim70/src/ui.c 2007-01-23 17:14:55.000000000 -0800 9195 9462 @@ -1137,7 +1137,6 @@ 9196 9463 int len; … … 9212 9479 diff -Naur vim70.orig/src/undo.c vim70/src/undo.c 9213 9480 --- vim70.orig/src/undo.c 2006-04-21 02:30:59.000000000 -0700 9214 +++ vim70/src/undo.c 200 6-12-05 19:57:56.000000000 -08009481 +++ vim70/src/undo.c 2007-01-23 17:15:12.000000000 -0800 9215 9482 @@ -84,7 +84,6 @@ 9216 9483 static void u_unch_branch __ARGS((u_header_T *uhp)); … … 9230 9497 { 9231 9498 /* Don't allow changes when 'modifiable' is off. */ 9232 @@ -1188,7 +1187,7 @@ 9499 @@ -342,11 +341,15 @@ 9500 uhp->uh_alt_next = old_curhead; 9501 if (old_curhead != NULL) 9502 { 9503 + uhp->uh_alt_prev = old_curhead->uh_alt_prev; 9504 + if (uhp->uh_alt_prev != NULL) 9505 + uhp->uh_alt_prev->uh_alt_next = uhp; 9506 old_curhead->uh_alt_prev = uhp; 9507 if (curbuf->b_u_oldhead == old_curhead) 9508 curbuf->b_u_oldhead = uhp; 9509 } 9510 - uhp->uh_alt_prev = NULL; 9511 + else 9512 + uhp->uh_alt_prev = NULL; 9513 if (curbuf->b_u_newhead != NULL) 9514 curbuf->b_u_newhead->uh_prev = uhp; 9515 9516 @@ -857,6 +860,11 @@ 9517 uhp = curbuf->b_u_curhead; 9518 while (uhp != NULL) 9519 { 9520 + /* Go back to the first branch with a mark. */ 9521 + while (uhp->uh_alt_prev != NULL 9522 + && uhp->uh_alt_prev->uh_walk == mark) 9523 + uhp = uhp->uh_alt_prev; 9524 + 9525 /* Find the last branch with a mark, that's the one. */ 9526 last = uhp; 9527 while (last->uh_alt_next != NULL 9528 @@ -866,6 +874,8 @@ 9529 { 9530 /* Make the used branch the first entry in the list of 9531 * alternatives to make "u" and CTRL-R take this branch. */ 9532 + while (uhp->uh_alt_prev != NULL) 9533 + uhp = uhp->uh_alt_prev; 9534 if (last->uh_alt_next != NULL) 9535 last->uh_alt_next->uh_alt_prev = last->uh_alt_prev; 9536 last->uh_alt_prev->uh_alt_next = last->uh_alt_next; 9537 @@ -1188,7 +1198,7 @@ 9233 9538 int did_undo; /* just did an undo */ 9234 9539 int absolute; /* used ":undo N" */ … … 9239 9544 char_u msgbuf[80]; 9240 9545 9241 @@ -1206,20 +12 05,20 @@9546 @@ -1206,20 +1216,20 @@ 9242 9547 9243 9548 u_oldcount -= u_newcount; … … 9266 9571 9267 9572 if (curbuf->b_u_curhead != NULL) 9268 @@ -1245,7 +12 44,7 @@9573 @@ -1245,7 +1255,7 @@ 9269 9574 9270 9575 smsg((char_u *)_("%ld %s; %s #%ld %s"), … … 9277 9582 diff -Naur vim70.orig/src/version.c vim70/src/version.c 9278 9583 --- vim70.orig/src/version.c 2006-05-03 00:50:42.000000000 -0700 9279 +++ vim70/src/version.c 200 6-12-05 19:58:39.000000000 -08009280 @@ -667,6 +667,3 28@@9584 +++ vim70/src/version.c 2007-01-23 17:15:26.000000000 -0800 9585 @@ -667,6 +667,346 @@ 9281 9586 static int included_patches[] = 9282 9587 { /* Add new patch number below this line */ 9283 9588 /**/ 9589 + 188, 9590 +/**/ 9591 + 187, 9592 +/**/ 9593 + 186, 9594 +/**/ 9595 + 185, 9596 +/**/ 9597 + 184, 9598 +/**/ 9599 + 183, 9600 +/**/ 9601 + 182, 9602 +/**/ 9603 + 181, 9604 +/**/ 9605 + 179, 9606 +/**/ 9284 9607 + 178, 9285 9608 +/**/ … … 9607 9930 }; 9608 9931 9609 @@ -731,7 +10 53,11 @@9932 @@ -731,7 +1071,11 @@ 9610 9933 /* Only MS VC 4.1 and earlier can do Win32s */ 9611 9934 MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version")); … … 9621 9944 diff -Naur vim70.orig/src/vim.h vim70/src/vim.h 9622 9945 --- vim70.orig/src/vim.h 2006-04-30 08:32:38.000000000 -0700 9623 +++ vim70/src/vim.h 200 6-12-05 19:58:11.000000000 -08009946 +++ vim70/src/vim.h 2007-01-23 17:15:23.000000000 -0800 9624 9947 @@ -585,7 +585,6 @@ 9625 9948 #define INSERT 0x10 /* Insert mode */ … … 9640 9963 #define FORWARD 1 9641 9964 #define BACKWARD (-1) 9965 @@ -1100,7 +1102,7 @@ 9966 EVENT_COLORSCHEME, /* after loading a colorscheme */ 9967 EVENT_FILEAPPENDPOST, /* after appending to a file */ 9968 EVENT_FILEAPPENDPRE, /* before appending to a file */ 9969 - EVENT_FILEAPPENDCMD, /* appende to a file using command */ 9970 + EVENT_FILEAPPENDCMD, /* append to a file using command */ 9971 EVENT_FILECHANGEDSHELL, /* after shell command that changed file */ 9972 EVENT_FILECHANGEDSHELLPOST, /* after (not) reloading changed file */ 9973 EVENT_FILECHANGEDRO, /* before first change to read-only file */ 9642 9974 @@ -1118,6 +1120,7 @@ 9643 9975 EVENT_FOCUSGAINED, /* got the focus */ … … 9648 9980 EVENT_INSERTENTER, /* when entering Insert mode */ 9649 9981 EVENT_INSERTLEAVE, /* when leaving Insert mode */ 9650 @@ -1666,7 +1669,10 @@ 9982 @@ -1144,6 +1147,7 @@ 9983 EVENT_REMOTEREPLY, /* upon string reception from a remote vim */ 9984 EVENT_SWAPEXISTS, /* found existing swap file */ 9985 EVENT_SOURCEPRE, /* before sourcing a Vim script */ 9986 + EVENT_SOURCECMD, /* sourcing a Vim script using command */ 9987 EVENT_SPELLFILEMISSING, /* spell file missing */ 9988 EVENT_CURSORMOVED, /* cursor was moved */ 9989 EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */ 9990 @@ -1666,7 +1670,10 @@ 9651 9991 #define VV_SWAPCHOICE 46 9652 9992 #define VV_SWAPCOMMAND 47 … … 9662 10002 diff -Naur vim70.orig/src/window.c vim70/src/window.c 9663 10003 --- vim70.orig/src/window.c 2006-05-06 03:54:51.000000000 -0700 9664 +++ vim70/src/window.c 200 6-12-05 19:58:12.000000000 -080010004 +++ vim70/src/window.c 2007-01-23 17:15:11.000000000 -0800 9665 10005 @@ -340,10 +340,10 @@ 9666 10006 {
Note:
See TracChangeset
for help on using the changeset viewer.