Changeset a60e4c5 for patches/vim-7.1-branch_update-2.patch
- Timestamp:
- Dec 19, 2007, 9:35:11 PM (17 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- a4357b0
- Parents:
- a2498b26
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/vim-7.1-branch_update-2.patch
ra2498b26 ra60e4c5 1 1 Submitted By: Jim Gifford (jim at linuxfromscratch dot org) 2 Date: 1 0-29-20072 Date: 12-21-2007 3 3 Initial Package Version: 7.1 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 7.1.1 456 Description: Contains all upstream patches up to 7.1.175 7 7 The following patches were skipped 8 003 007 041 065 070 072 080 088 091 092 124 126 128 129 134 8 003 007 041 065 070 072 080 088 091 092 124 126 128 129 134 146 158 168 9 9 10 10 diff -Naur vim71.orig/runtime/doc/change.txt vim71/runtime/doc/change.txt 11 --- vim71.orig/runtime/doc/change.txt 2007-05-12 0 3:18:46.000000000 -070012 +++ vim71/runtime/doc/change.txt 2007-1 0-29 08:09:16.000000000 -070011 --- vim71.orig/runtime/doc/change.txt 2007-05-12 06:18:46.000000000 -0400 12 +++ vim71/runtime/doc/change.txt 2007-12-20 23:57:04.000000000 -0500 13 13 @@ -1571,6 +1571,10 @@ 14 14 in their original order, right before the sorted … … 23 23 24 24 diff -Naur vim71.orig/runtime/doc/eval.txt vim71/runtime/doc/eval.txt 25 --- vim71.orig/runtime/doc/eval.txt 2007-05-12 0 3:18:46.000000000 -070026 +++ vim71/runtime/doc/eval.txt 2007-1 0-29 08:09:38.000000000 -070025 --- vim71.orig/runtime/doc/eval.txt 2007-05-12 06:18:46.000000000 -0400 26 +++ vim71/runtime/doc/eval.txt 2007-12-20 23:58:59.000000000 -0500 27 27 @@ -1,4 +1,4 @@ 28 28 -*eval.txt* For Vim version 7.1. Last change: 2007 May 11 … … 251 251 The accepted positions are: 252 252 diff -Naur vim71.orig/runtime/doc/options.txt vim71/runtime/doc/options.txt 253 --- vim71.orig/runtime/doc/options.txt 2007-05-12 0 3:18:47.000000000 -0700254 +++ vim71/runtime/doc/options.txt 2007-1 0-29 08:09:23.000000000 -0700253 --- vim71.orig/runtime/doc/options.txt 2007-05-12 06:18:47.000000000 -0400 254 +++ vim71/runtime/doc/options.txt 2007-12-20 23:57:54.000000000 -0500 255 255 @@ -1,4 +1,4 @@ 256 256 -*options.txt* For Vim version 7.1. Last change: 2007 May 11 … … 271 271 'equalprg' 'ep' string (default "") 272 272 diff -Naur vim71.orig/runtime/doc/pattern.txt vim71/runtime/doc/pattern.txt 273 --- vim71.orig/runtime/doc/pattern.txt 2007-05-12 0 3:18:47.000000000 -0700274 +++ vim71/runtime/doc/pattern.txt 2007-1 0-29 08:09:16.000000000 -0700273 --- vim71.orig/runtime/doc/pattern.txt 2007-05-12 06:18:47.000000000 -0400 274 +++ vim71/runtime/doc/pattern.txt 2007-12-20 23:57:20.000000000 -0500 275 275 @@ -1212,7 +1212,10 @@ 276 276 {group} must exist at the moment this command is executed. … … 304 304 column 72 and more: > 305 305 diff -Naur vim71.orig/runtime/doc/pi_paren.txt vim71/runtime/doc/pi_paren.txt 306 --- vim71.orig/runtime/doc/pi_paren.txt 2007-05-12 0 3:18:47.000000000 -0700307 +++ vim71/runtime/doc/pi_paren.txt 2007-1 0-29 08:09:30.000000000 -0700306 --- vim71.orig/runtime/doc/pi_paren.txt 2007-05-12 06:18:47.000000000 -0400 307 +++ vim71/runtime/doc/pi_paren.txt 2007-12-20 23:58:11.000000000 -0500 308 308 @@ -12,8 +12,8 @@ 309 309 You can avoid loading this plugin by setting the "loaded_matchparen" variable: > … … 318 318 319 319 diff -Naur vim71.orig/runtime/doc/usr_41.txt vim71/runtime/doc/usr_41.txt 320 --- vim71.orig/runtime/doc/usr_41.txt 2007-05-12 0 3:18:48.000000000 -0700321 +++ vim71/runtime/doc/usr_41.txt 2007-1 0-29 08:09:16.000000000 -0700320 --- vim71.orig/runtime/doc/usr_41.txt 2007-05-12 06:18:48.000000000 -0400 321 +++ vim71/runtime/doc/usr_41.txt 2007-12-20 23:57:20.000000000 -0500 322 322 @@ -763,13 +763,22 @@ 323 323 foldtextresult() get the text displayed for a closed fold … … 344 344 spellbadword() locate badly spelled word at or after cursor 345 345 diff -Naur vim71.orig/runtime/doc/windows.txt vim71/runtime/doc/windows.txt 346 --- vim71.orig/runtime/doc/windows.txt 2007-05-12 0 3:18:49.000000000 -0700347 +++ vim71/runtime/doc/windows.txt 2007-1 0-29 08:09:23.000000000 -0700346 --- vim71.orig/runtime/doc/windows.txt 2007-05-12 06:18:49.000000000 -0400 347 +++ vim71/runtime/doc/windows.txt 2007-12-20 23:57:54.000000000 -0500 348 348 @@ -132,7 +132,8 @@ 349 349 the same file. Make new window N high (default is to use half … … 374 374 375 375 diff -Naur vim71.orig/runtime/filetype.vim vim71/runtime/filetype.vim 376 --- vim71.orig/runtime/filetype.vim 2007-05-10 08:14:37.000000000 -0700377 +++ vim71/runtime/filetype.vim 2007-1 0-29 08:09:11.000000000 -0700376 --- vim71.orig/runtime/filetype.vim 2007-05-10 11:14:37.000000000 -0400 377 +++ vim71/runtime/filetype.vim 2007-12-20 23:56:32.000000000 -0500 378 378 @@ -1,7 +1,7 @@ 379 379 " Vim support file to detect file types … … 394 394 " Privoxy actions file 395 395 au BufNewFile,BufRead *.action setf privoxy 396 diff -Naur vim71.orig/runtime/menu.vim vim71/runtime/menu.vim 397 --- vim71.orig/runtime/menu.vim 2007-01-09 08:31:40.000000000 -0500 398 +++ vim71/runtime/menu.vim 2007-12-20 23:59:53.000000000 -0500 399 @@ -2,7 +2,7 @@ 400 " You can also use this as a start for your own set of menus. 401 " 402 " Maintainer: Bram Moolenaar <Bram@vim.org> 403 -" Last Change: 2007 Jan 09 404 +" Last Change: 2007 Nov 19 405 406 " Note that ":an" (short for ":anoremenu") is often used to make a menu work 407 " in all modes and avoid side effects from mappings defined by the user. 408 @@ -658,7 +658,6 @@ 409 let buf = 1 410 while buf <= bufnr('$') 411 if bufexists(buf) && !isdirectory(bufname(buf)) && buflisted(buf) 412 - \ && !getbufvar(buf, "&bufsecret") 413 let s:bmenu_count = s:bmenu_count + 1 414 endif 415 let buf = buf + 1 416 @@ -671,7 +670,6 @@ 417 let buf = 1 418 while buf <= bufnr('$') 419 if bufexists(buf) && !isdirectory(bufname(buf)) && buflisted(buf) 420 - \ && !getbufvar(buf, "&bufsecret") 421 call <SID>BMFilename(bufname(buf), buf) 422 endif 423 let buf = buf + 1 396 424 diff -Naur vim71.orig/runtime/plugin/matchparen.vim vim71/runtime/plugin/matchparen.vim 397 --- vim71.orig/runtime/plugin/matchparen.vim 2006-10-12 1 3:05:05.000000000 -0700398 +++ vim71/runtime/plugin/matchparen.vim 2007-1 0-29 08:09:30.000000000 -0700425 --- vim71.orig/runtime/plugin/matchparen.vim 2006-10-12 16:05:05.000000000 -0400 426 +++ vim71/runtime/plugin/matchparen.vim 2007-12-20 23:58:11.000000000 -0500 399 427 @@ -1,6 +1,6 @@ 400 428 " Vim plugin for showing matching parens … … 477 505 let &cpo = cpo_save 478 506 diff -Naur vim71.orig/src/auto/configure vim71/src/auto/configure 479 --- vim71.orig/src/auto/configure 2007-05-12 0 4:49:09.000000000 -0700480 +++ vim71/src/auto/configure 2007-1 0-29 08:09:16.000000000 -0700507 --- vim71.orig/src/auto/configure 2007-05-12 07:49:09.000000000 -0400 508 +++ vim71/src/auto/configure 2007-12-20 23:59:34.000000000 -0500 481 509 @@ -3843,7 +3843,9 @@ 482 510 fi … … 490 518 else 491 519 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc" 520 @@ -10263,8 +10265,9 @@ 521 522 523 524 + 525 for ac_header in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ 526 - termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ 527 + termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h sys/types.h termio.h \ 528 iconv.h langinfo.h unistd.h stropts.h errno.h \ 529 sys/resource.h sys/systeminfo.h locale.h \ 530 sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ 492 531 diff -Naur vim71.orig/src/buffer.c vim71/src/buffer.c 493 --- vim71.orig/src/buffer.c 2007-05-10 08:25:59.000000000 -0700494 +++ vim71/src/buffer.c 2007-1 0-29 08:09:50.000000000 -0700532 --- vim71.orig/src/buffer.c 2007-05-10 11:25:59.000000000 -0400 533 +++ vim71/src/buffer.c 2007-12-20 23:59:17.000000000 -0500 495 534 @@ -171,6 +171,13 @@ 496 535 /* Put the cursor on the first line. */ … … 602 641 } 603 642 diff -Naur vim71.orig/src/charset.c vim71/src/charset.c 604 --- vim71.orig/src/charset.c 2007-03-24 1 3:10:37.000000000 -0700605 +++ vim71/src/charset.c 2007-1 0-29 08:09:30.000000000 -0700643 --- vim71.orig/src/charset.c 2007-03-24 16:10:37.000000000 -0400 644 +++ vim71/src/charset.c 2007-12-20 23:58:12.000000000 -0500 606 645 @@ -207,7 +207,10 @@ 607 646 } … … 650 689 /* 651 690 diff -Naur vim71.orig/src/configure.in vim71/src/configure.in 652 --- vim71.orig/src/configure.in 2007-05-12 0 2:19:27.000000000 -0700653 +++ vim71/src/configure.in 2007-1 0-29 08:09:16.000000000 -0700691 --- vim71.orig/src/configure.in 2007-05-12 05:19:27.000000000 -0400 692 +++ vim71/src/configure.in 2007-12-20 23:59:34.000000000 -0500 654 693 @@ -423,7 +423,9 @@ 655 694 fi … … 663 702 else 664 703 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzscheme -lmzgc" 704 @@ -2024,7 +2026,7 @@ 705 fi 706 707 AC_CHECK_HEADERS(stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ 708 - termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \ 709 + termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h sys/types.h termio.h \ 710 iconv.h langinfo.h unistd.h stropts.h errno.h \ 711 sys/resource.h sys/systeminfo.h locale.h \ 712 sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ 665 713 diff -Naur vim71.orig/src/diff.c vim71/src/diff.c 666 --- vim71.orig/src/diff.c 2007-02-15 1 6:18:41.000000000 -0800667 +++ vim71/src/diff.c 2007-1 0-29 08:09:51.000000000 -0700714 --- vim71.orig/src/diff.c 2007-02-15 19:18:41.000000000 -0500 715 +++ vim71/src/diff.c 2007-12-20 23:59:28.000000000 -0500 668 716 @@ -791,6 +791,9 @@ 669 717 } … … 714 762 - dp->df_lnum[i] + off; 715 763 diff -Naur vim71.orig/src/digraph.c vim71/src/digraph.c 716 --- vim71.orig/src/digraph.c 2006-05-02 1 1:24:04.000000000 -0700717 +++ vim71/src/digraph.c 2007-1 0-29 08:09:37.000000000 -0700764 --- vim71.orig/src/digraph.c 2006-05-02 14:24:04.000000000 -0400 765 +++ vim71/src/digraph.c 2007-12-20 23:58:39.000000000 -0500 718 766 @@ -2028,7 +2028,7 @@ 719 767 … … 755 803 #endif 756 804 diff -Naur vim71.orig/src/edit.c vim71/src/edit.c 757 --- vim71.orig/src/edit.c 2007-05-07 1 2:43:55.000000000 -0700758 +++ vim71/src/edit.c 2007-1 0-29 08:09:51.000000000 -0700805 --- vim71.orig/src/edit.c 2007-05-07 15:43:55.000000000 -0400 806 +++ vim71/src/edit.c 2007-12-21 00:00:07.000000000 -0500 759 807 @@ -129,6 +129,7 @@ 760 808 … … 855 903 856 904 - if (p_ic && curbuf->b_p_inf && len < IOSIZE) 857 + if (p_ic && curbuf->b_p_inf )905 + if (p_ic && curbuf->b_p_inf && len > 0) 858 906 { 859 907 - /* Infer case of completed part -- webb */ … … 897 945 +#ifdef FEAT_MBYTE 898 946 + if (has_mbyte) 899 { 900 - for (idx = 0; idx < compl_length; ++idx) 947 + { 901 948 + p = compl_orig_text; 902 949 + actual_compl_length = 0; 903 950 + while (*p != NUL) 904 { 905 - if (was_letter && isupper(compl_orig_text[idx]) 906 - && islower(IObuff[idx])) 951 + { 907 952 + mb_ptr_adv(p); 908 953 + ++actual_compl_length; … … 916 961 + wca = (int *)alloc(actual_len * sizeof(int)); 917 962 + if (wca != NULL) 918 + { 963 { 964 - for (idx = 0; idx < compl_length; ++idx) 919 965 + p = str; 920 966 + for (i = 0; i < actual_len; ++i) … … 929 975 + p = compl_orig_text; 930 976 + for (i = 0; i < actual_compl_length; ++i) 931 + { 977 { 978 - if (was_letter && isupper(compl_orig_text[idx]) 979 - && islower(IObuff[idx])) 932 980 +#ifdef FEAT_MBYTE 933 981 + if (has_mbyte) … … 999 1047 + } 1000 1048 + 1001 + /* 1049 + /* 1002 1050 + * Generate encoding specific output from wide character array. 1003 1051 + * Multi-byte characters can occupy up to five bytes more than … … 1010 1058 +#ifdef FEAT_MBYTE 1011 1059 + if (has_mbyte) 1012 + p += mb_char2bytes(wca[i++], p);1060 + p += (*mb_char2bytes)(wca[i++], p); 1013 1061 + else 1014 1062 +#endif … … 1068 1116 1069 1117 /* Deleted more than what was used to find matches or didn't finish 1118 @@ -3250,8 +3385,8 @@ 1119 if (c != Ctrl_R && vim_is_ctrl_x_key(c)) 1120 edit_submode_extra = NULL; 1121 1122 - /* Ignore end of Select mode mapping */ 1123 - if (c == K_SELECT) 1124 + /* Ignore end of Select mode mapping and mouse scroll buttons. */ 1125 + if (c == K_SELECT || c == K_MOUSEDOWN || c == K_MOUSEUP) 1126 return retval; 1127 1128 /* Set "compl_get_longest" when finding the first matches. */ 1070 1129 @@ -4495,14 +4630,13 @@ 1071 1130 curs_col = curwin->w_cursor.col; … … 1100 1159 if (!(State & CMDLINE) 1101 1160 # ifdef FEAT_MBYTE 1102 @@ -7215,6 +7346,8 @@ 1161 @@ -6313,8 +6444,10 @@ 1162 { 1163 vim_free(last_insert); 1164 last_insert = NULL; 1165 +# ifdef FEAT_INS_EXPAND 1166 vim_free(compl_orig_text); 1167 compl_orig_text = NULL; 1168 +# endif 1169 } 1170 #endif 1171 1172 @@ -7215,6 +7348,8 @@ 1103 1173 p = ml_get_curline(); 1104 1174 if (cin_iscase(p) || cin_isscopedecl(p) || cin_islabel(30)) … … 1109 1179 && p[curwin->w_cursor.col - 1] == ':' 1110 1180 && p[curwin->w_cursor.col - 2] == ':') 1111 @@ -7477,7 +761 0,7 @@1181 @@ -7477,7 +7612,7 @@ 1112 1182 * deleted when ESC is hit. 1113 1183 */ … … 1118 1188 LANGMAP_ADJUST(regname, TRUE); 1119 1189 #endif 1120 @@ -7488,7 +762 1,7 @@1190 @@ -7488,7 +7623,7 @@ 1121 1191 #ifdef FEAT_CMDL_INFO 1122 1192 add_to_showcmd_c(literally); … … 1127 1197 LANGMAP_ADJUST(regname, TRUE); 1128 1198 #endif 1129 @@ -7579,7 +771 2,7 @@1199 @@ -7579,7 +7714,7 @@ 1130 1200 * deleted when ESC is hit. 1131 1201 */ … … 1136 1206 switch (c) 1137 1207 { 1138 @@ -7998,7 +813 1,8 @@1208 @@ -7998,7 +8133,8 @@ 1139 1209 /* 1140 1210 * 0^D and ^^D: remove all indent. … … 1146 1216 --curwin->w_cursor.col; 1147 1217 (void)del_char(FALSE); /* delete the '^' or '0' */ 1148 @@ -9257,7 +9391,7 @@ 1218 @@ -8053,6 +8189,29 @@ 1219 AppendCharToRedobuff(K_DEL); 1220 } 1221 1222 +static void ins_bs_one __ARGS((colnr_T *vcolp)); 1223 + 1224 +/* 1225 + * Delete one character for ins_bs(). 1226 + */ 1227 + static void 1228 +ins_bs_one(vcolp) 1229 + colnr_T *vcolp; 1230 +{ 1231 + dec_cursor(); 1232 + getvcol(curwin, &curwin->w_cursor, vcolp, NULL, NULL); 1233 + if (State & REPLACE_FLAG) 1234 + { 1235 + /* Don't delete characters before the insert point when in 1236 + * Replace mode */ 1237 + if (curwin->w_cursor.lnum != Insstart.lnum 1238 + || curwin->w_cursor.col >= Insstart.col) 1239 + replace_do_bs(); 1240 + } 1241 + else 1242 + (void)del_char(FALSE); 1243 +} 1244 + 1245 /* 1246 * Handle Backspace, delete-word and delete-line in Insert mode. 1247 * Return TRUE when backspace was actually used. 1248 @@ -8282,9 +8441,7 @@ 1249 int ts; 1250 colnr_T vcol; 1251 colnr_T want_vcol; 1252 -#if 0 1253 - int extra = 0; 1254 -#endif 1255 + colnr_T start_vcol; 1256 1257 *inserted_space_p = FALSE; 1258 if (p_sta && in_indent) 1259 @@ -8295,6 +8452,7 @@ 1260 * 'showbreak' may get in the way, need to get the last column of 1261 * the previous character. */ 1262 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); 1263 + start_vcol = vcol; 1264 dec_cursor(); 1265 getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol); 1266 inc_cursor(); 1267 @@ -8303,30 +8461,7 @@ 1268 /* delete characters until we are at or before want_vcol */ 1269 while (vcol > want_vcol 1270 && (cc = *(ml_get_cursor() - 1), vim_iswhite(cc))) 1271 - { 1272 - dec_cursor(); 1273 - getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); 1274 - if (State & REPLACE_FLAG) 1275 - { 1276 - /* Don't delete characters before the insert point when in 1277 - * Replace mode */ 1278 - if (curwin->w_cursor.lnum != Insstart.lnum 1279 - || curwin->w_cursor.col >= Insstart.col) 1280 - { 1281 -#if 0 /* what was this for? It causes problems when sw != ts. */ 1282 - if (State == REPLACE && (int)vcol < want_vcol) 1283 - { 1284 - (void)del_char(FALSE); 1285 - extra = 2; /* don't pop too much */ 1286 - } 1287 - else 1288 -#endif 1289 - replace_do_bs(); 1290 - } 1291 - } 1292 - else 1293 - (void)del_char(FALSE); 1294 - } 1295 + ins_bs_one(&vcol); 1296 1297 /* insert extra spaces until we are at want_vcol */ 1298 while (vcol < want_vcol) 1299 @@ -8343,22 +8478,16 @@ 1300 #endif 1301 { 1302 ins_str((char_u *)" "); 1303 - if ((State & REPLACE_FLAG) /* && extra <= 1 */) 1304 - { 1305 -#if 0 1306 - if (extra) 1307 - replace_push_off(NUL); 1308 - else 1309 -#endif 1310 - replace_push(NUL); 1311 - } 1312 -#if 0 1313 - if (extra == 2) 1314 - extra = 1; 1315 -#endif 1316 + if ((State & REPLACE_FLAG)) 1317 + replace_push(NUL); 1318 } 1319 getvcol(curwin, &curwin->w_cursor, &vcol, NULL, NULL); 1320 } 1321 + 1322 + /* If we are now back where we started delete one character. Can 1323 + * happen when using 'sts' and 'linebreak'. */ 1324 + if (vcol >= start_vcol) 1325 + ins_bs_one(&vcol); 1326 } 1327 1328 /* 1329 @@ -8518,15 +8647,16 @@ 1330 int up; 1331 { 1332 pos_T tpos; 1333 -# if defined(FEAT_GUI) && defined(FEAT_WINDOWS) 1334 - win_T *old_curwin; 1335 +# if defined(FEAT_WINDOWS) 1336 + win_T *old_curwin = curwin; 1337 +# endif 1338 +# ifdef FEAT_INS_EXPAND 1339 + int did_scroll = FALSE; 1340 # endif 1341 1342 tpos = curwin->w_cursor; 1343 1344 # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) 1345 - old_curwin = curwin; 1346 - 1347 /* Currently the mouse coordinates are only known in the GUI. */ 1348 if (gui.in_use && mouse_row >= 0 && mouse_col >= 0) 1349 { 1350 @@ -8543,10 +8673,23 @@ 1351 # endif 1352 undisplay_dollar(); 1353 1354 - if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) 1355 - scroll_redraw(up, (long)(curwin->w_botline - curwin->w_topline)); 1356 - else 1357 - scroll_redraw(up, 3L); 1358 +# ifdef FEAT_INS_EXPAND 1359 + /* Don't scroll the window in which completion is being done. */ 1360 + if (!pum_visible() 1361 +# if defined(FEAT_WINDOWS) 1362 + || curwin != old_curwin 1363 +# endif 1364 + ) 1365 +# endif 1366 + { 1367 + if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) 1368 + scroll_redraw(up, (long)(curwin->w_botline - curwin->w_topline)); 1369 + else 1370 + scroll_redraw(up, 3L); 1371 +# ifdef FEAT_INS_EXPAND 1372 + did_scroll = TRUE; 1373 +# endif 1374 + } 1375 1376 # if defined(FEAT_GUI) && defined(FEAT_WINDOWS) 1377 curwin->w_redr_status = TRUE; 1378 @@ -8555,6 +8698,17 @@ 1379 curbuf = curwin->w_buffer; 1380 # endif 1381 1382 +# ifdef FEAT_INS_EXPAND 1383 + /* The popup menu may overlay the window, need to redraw it. 1384 + * TODO: Would be more efficient to only redraw the windows that are 1385 + * overlapped by the popup menu. */ 1386 + if (pum_visible() && did_scroll) 1387 + { 1388 + redraw_all_later(NOT_VALID); 1389 + ins_compl_show_pum(); 1390 + } 1391 +# endif 1392 + 1393 if (!equalpos(curwin->w_cursor, tpos)) 1394 { 1395 start_arrow(&tpos); 1396 @@ -9257,7 +9411,7 @@ 1149 1397 * mode message to be deleted when ESC is hit */ 1150 1398 ++no_mapping; … … 1155 1403 --allow_keys; 1156 1404 if (IS_SPECIAL(c) || mod_mask) /* special key */ 1157 @@ -9289,7 +94 23,7 @@1405 @@ -9289,7 +9443,7 @@ 1158 1406 } 1159 1407 ++no_mapping; … … 1165 1413 if (cc != ESC) 1166 1414 diff -Naur vim71.orig/src/eval.c vim71/src/eval.c 1167 --- vim71.orig/src/eval.c 2007-05-07 1 2:47:32.000000000 -07001168 +++ vim71/src/eval.c 2007-1 0-29 08:09:48.000000000 -07001415 --- vim71.orig/src/eval.c 2007-05-07 15:47:32.000000000 -0400 1416 +++ vim71/src/eval.c 2007-12-21 00:00:00.000000000 -0500 1169 1417 @@ -369,17 +369,17 @@ 1170 1418 static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars)); … … 1675 1923 */ 1676 1924 static void 1925 @@ -8682,7 +8729,7 @@ 1926 static int fnum = 0; 1927 static int change_start = 0; 1928 static int change_end = 0; 1929 - static hlf_T hlID = 0; 1930 + static hlf_T hlID = (hlf_T)0; 1931 int filler_lines; 1932 int col; 1933 1677 1934 @@ -9339,15 +9386,16 @@ 1678 1935 { … … 2046 2303 } 2047 2304 2305 @@ -15599,7 +15826,7 @@ 2306 FILE *fd; 2307 2308 if (check_restricted() || check_secure()) 2309 - return; 2310 + goto done; 2311 2312 if (argvars[1].v_type != VAR_UNKNOWN) 2313 { 2314 @@ -15610,7 +15837,7 @@ 2315 if ((infile = vim_tempname('i')) == NULL) 2316 { 2317 EMSG(_(e_notmp)); 2318 - return; 2319 + goto done; 2320 } 2321 2322 fd = mch_fopen((char *)infile, WRITEBIN); 2048 2323 @@ -16497,9 +16724,9 @@ 2049 2324 * Returns NULL when there is an error. … … 2258 2533 /* ":8" - shortname */ 2259 2534 diff -Naur vim71.orig/src/ex_cmds.c vim71/src/ex_cmds.c 2260 --- vim71.orig/src/ex_cmds.c 2007-05-07 1 2:41:01.000000000 -07002261 +++ vim71/src/ex_cmds.c 2007-1 0-29 08:09:37.000000000 -07002535 --- vim71.orig/src/ex_cmds.c 2007-05-07 15:41:01.000000000 -0400 2536 +++ vim71/src/ex_cmds.c 2007-12-21 00:00:05.000000000 -0500 2262 2537 @@ -408,7 +408,11 @@ 2263 2538 goto sortend; … … 2273 2548 goto sortend; 2274 2549 p = s; /* continue after the regexp */ 2275 @@ -2912,22 +2916,35 @@ 2550 @@ -1646,7 +1650,7 @@ 2551 { 2552 vim_snprintf((char *)IObuff, IOSIZE, _("%sviminfo: %s in line: "), 2553 errnum, message); 2554 - STRNCAT(IObuff, line, IOSIZE - STRLEN(IObuff)); 2555 + STRNCAT(IObuff, line, IOSIZE - STRLEN(IObuff) - 1); 2556 if (IObuff[STRLEN(IObuff) - 1] == '\n') 2557 IObuff[STRLEN(IObuff) - 1] = NUL; 2558 emsg(IObuff); 2559 @@ -1770,7 +1774,8 @@ 2560 * overwrite a user's viminfo file after a "su root", with a 2561 * viminfo file that the user can't read. 2562 */ 2563 - st_old.st_dev = st_old.st_ino = 0; 2564 + st_old.st_dev = 0; 2565 + st_old.st_ino = 0; 2566 st_old.st_mode = 0600; 2567 if (mch_stat((char *)fname, &st_old) == 0 2568 && getuid() != ROOT_UID 2569 @@ -2727,6 +2732,9 @@ 2570 && vim_strchr(p_cpo, CPO_OVERNEW) == NULL) 2571 || (buf->b_flags & BF_READERR)) 2572 && !p_wa 2573 +#ifdef FEAT_QUICKFIX 2574 + && !bt_nofile(buf) 2575 +#endif 2576 && vim_fexists(ffname)) 2577 { 2578 if (!eap->forceit && !eap->append) 2579 @@ -2912,22 +2920,35 @@ 2276 2580 } 2277 2581 … … 2313 2617 2314 2618 if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) == VIM_YES) 2315 @@ -2941,9 +29 58,14 @@2619 @@ -2941,9 +2962,14 @@ 2316 2620 } 2317 2621 else … … 2328 2632 } 2329 2633 2330 @@ -2952,7 +297 4,7 @@2634 @@ -2952,7 +2978,7 @@ 2331 2635 * 'fnum' is the number of the file, if zero use ffname/sfname. 2332 2636 * … … 2337 2641 */ 2338 2642 int 2339 @@ -3367,7 +33 89,7 @@2643 @@ -3367,7 +3393,7 @@ 2340 2644 * was in this window (or another window). If not used 2341 2645 * before, reset the local window options to the global … … 2346 2650 did_get_winopts = TRUE; 2347 2651 #endif 2348 @@ -3562,9 +358 4,20 @@2652 @@ -3562,9 +3588,20 @@ 2349 2653 curwin_init(); 2350 2654 … … 2369 2673 2370 2674 /* Change directories when the 'acd' option is set. */ 2371 @@ -3649,8 +368 2,8 @@2675 @@ -3649,8 +3686,8 @@ 2372 2676 #ifdef FEAT_SPELL 2373 2677 /* If the window options were changed may need to set the spell language. … … 2380 2684 2381 2685 if (command == NULL) 2382 @@ -3754,7 +37 87,7 @@2686 @@ -3754,7 +3791,7 @@ 2383 2687 workshop_file_opened((char *)curbuf->b_ffname, curbuf->b_p_ro); 2384 2688 # endif … … 2389 2693 # endif 2390 2694 } 2391 @@ -4294,6 +43 27,7 @@2695 @@ -4294,6 +4331,7 @@ 2392 2696 do_error = TRUE; 2393 2697 do_print = FALSE; … … 2397 2701 } 2398 2702 while (*cmd) 2399 @@ -4464,7 +4 498,7 @@2703 @@ -4464,7 +4502,7 @@ 2400 2704 * 2401 2705 * The new text is built up in new_start[]. It has some extra … … 2406 2710 * Make a copy of the old line, so it won't be taken away when 2407 2711 * updating the screen or handling a multi-line match. The "old_" 2408 @@ -4635,7 +46 69,7 @@2712 @@ -4635,7 +4673,7 @@ 2409 2713 #endif 2410 2714 ++no_mapping; /* don't map this key */ … … 2415 2719 --no_mapping; 2416 2720 2417 @@ -6351,9 +6385,9 @@ 2721 @@ -4850,7 +4888,8 @@ 2722 ++line2; 2723 /* move the cursor to the new line, like Vi */ 2724 ++curwin->w_cursor.lnum; 2725 - STRCPY(new_start, p1 + 1); /* copy the rest */ 2726 + /* copy the rest */ 2727 + mch_memmove(new_start, p1 + 1, STRLEN(p1 + 1) + 1); 2728 p1 = new_start - 1; 2729 } 2730 } 2731 @@ -6351,9 +6390,9 @@ 2418 2732 for (i = 0; i < ga.ga_len; ++i) 2419 2733 { … … 2428 2742 fprintf(fd_tags, "%s\t/*", s); 2429 2743 diff -Naur vim71.orig/src/ex_docmd.c vim71/src/ex_docmd.c 2430 --- vim71.orig/src/ex_docmd.c 2007-05-07 1 2:49:38.000000000 -07002431 +++ vim71/src/ex_docmd.c 2007-1 0-29 08:09:51.000000000 -07002744 --- vim71.orig/src/ex_docmd.c 2007-05-07 15:49:38.000000000 -0400 2745 +++ vim71/src/ex_docmd.c 2007-12-21 00:00:05.000000000 -0500 2432 2746 @@ -133,6 +133,7 @@ 2433 2747 static void get_flags __ARGS((exarg_T *eap)); … … 2438 2752 #endif 2439 2753 static char_u *invalid_range __ARGS((exarg_T *eap)); 2440 @@ -2118,7 +2119,11 @@ 2754 @@ -666,7 +667,7 @@ 2755 if (ex_pressedreturn) 2756 { 2757 /* go up one line, to overwrite the ":<CR>" line, so the 2758 - * output doensn't contain empty lines. */ 2759 + * output doesn't contain empty lines. */ 2760 msg_row = prev_msg_row; 2761 if (prev_msg_row == Rows - 1) 2762 msg_row--; 2763 @@ -1741,7 +1742,9 @@ 2764 } 2765 2766 /* ignore comment and empty lines */ 2767 - if (*ea.cmd == '"' || *ea.cmd == NUL) 2768 + if (*ea.cmd == '"') 2769 + goto doend; 2770 + if (*ea.cmd == NUL) 2771 { 2772 ex_pressedreturn = TRUE; 2773 goto doend; 2774 @@ -2118,7 +2121,11 @@ 2441 2775 #ifdef FEAT_USR_CMDS 2442 2776 !USER_CMDIDX(ea.cmdidx) && … … 2451 2785 #ifndef FEAT_EVAL 2452 2786 /* 2453 @@ -3276,39 +3281,65 @@ 2787 @@ -2654,7 +2661,7 @@ 2788 errormsg = IObuff; 2789 } 2790 STRCAT(errormsg, ": "); 2791 - STRNCAT(errormsg, *cmdlinep, IOSIZE - STRLEN(IObuff)); 2792 + STRNCAT(errormsg, *cmdlinep, IOSIZE - STRLEN(IObuff) - 1); 2793 } 2794 emsg(errormsg); 2795 } 2796 @@ -2756,7 +2763,7 @@ 2797 2798 /* 2799 * Isolate the command and search for it in the command table. 2800 - * Exeptions: 2801 + * Exceptions: 2802 * - the 'k' command can directly be followed by any character. 2803 * - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r' 2804 * but :sre[wind] is another command, as are :scrip[tnames], 2805 @@ -2957,6 +2964,57 @@ 2806 #endif 2807 2808 #if defined(FEAT_EVAL) || defined(PROTO) 2809 +static struct cmdmod 2810 +{ 2811 + char *name; 2812 + int minlen; 2813 + int has_count; /* :123verbose :3tab */ 2814 +} cmdmods[] = { 2815 + {"aboveleft", 3, FALSE}, 2816 + {"belowright", 3, FALSE}, 2817 + {"botright", 2, FALSE}, 2818 + {"browse", 3, FALSE}, 2819 + {"confirm", 4, FALSE}, 2820 + {"hide", 3, FALSE}, 2821 + {"keepalt", 5, FALSE}, 2822 + {"keepjumps", 5, FALSE}, 2823 + {"keepmarks", 3, FALSE}, 2824 + {"leftabove", 5, FALSE}, 2825 + {"lockmarks", 3, FALSE}, 2826 + {"rightbelow", 6, FALSE}, 2827 + {"sandbox", 3, FALSE}, 2828 + {"silent", 3, FALSE}, 2829 + {"tab", 3, TRUE}, 2830 + {"topleft", 2, FALSE}, 2831 + {"verbose", 4, TRUE}, 2832 + {"vertical", 4, FALSE}, 2833 +}; 2834 + 2835 +/* 2836 + * Return length of a command modifier (including optional count). 2837 + * Return zero when it's not a modifier. 2838 + */ 2839 + int 2840 +modifier_len(cmd) 2841 + char_u *cmd; 2842 +{ 2843 + int i, j; 2844 + char_u *p = cmd; 2845 + 2846 + if (VIM_ISDIGIT(*cmd)) 2847 + p = skipwhite(skipdigits(cmd)); 2848 + for (i = 0; i < sizeof(cmdmods) / sizeof(struct cmdmod); ++i) 2849 + { 2850 + for (j = 0; p[j] != NUL; ++j) 2851 + if (p[j] != cmdmods[i].name[j]) 2852 + break; 2853 + if (!isalpha(p[j]) && j >= cmdmods[i].minlen 2854 + && (p == cmd || cmdmods[i].has_count)) 2855 + return j + (p - cmd); 2856 + } 2857 + return 0; 2858 +} 2859 + 2860 /* 2861 * Return > 0 if an Ex command "name" exists. 2862 * Return 2 if there is an exact match. 2863 @@ -2971,30 +3029,6 @@ 2864 int i; 2865 int j; 2866 char_u *p; 2867 - static struct cmdmod 2868 - { 2869 - char *name; 2870 - int minlen; 2871 - } cmdmods[] = { 2872 - {"aboveleft", 3}, 2873 - {"belowright", 3}, 2874 - {"botright", 2}, 2875 - {"browse", 3}, 2876 - {"confirm", 4}, 2877 - {"hide", 3}, 2878 - {"keepalt", 5}, 2879 - {"keepjumps", 5}, 2880 - {"keepmarks", 3}, 2881 - {"leftabove", 5}, 2882 - {"lockmarks", 3}, 2883 - {"rightbelow", 6}, 2884 - {"sandbox", 3}, 2885 - {"silent", 3}, 2886 - {"tab", 3}, 2887 - {"topleft", 2}, 2888 - {"verbose", 4}, 2889 - {"vertical", 4}, 2890 - }; 2891 2892 /* Check command modifiers. */ 2893 for (i = 0; i < sizeof(cmdmods) / sizeof(struct cmdmod); ++i) 2894 @@ -3276,39 +3310,65 @@ 2454 2895 2455 2896 if (ea.argt & XFILE) … … 2534 2975 mb_ptr_adv(p); 2535 2976 } 2536 @@ -3401,14 +34 32,13 @@2977 @@ -3401,14 +3461,13 @@ 2537 2978 case CMD_windo: 2538 2979 return arg; … … 2553 2994 if (*arg != NUL) 2554 2995 { 2555 @@ -3417,9 +34 47,8 @@2996 @@ -3417,9 +3476,8 @@ 2556 2997 } 2557 2998 } … … 2564 3005 * All completion for the +cmdline_compl feature goes here. 2565 3006 */ 2566 @@ -3617,8 +36 46,7 @@3007 @@ -3617,8 +3675,7 @@ 2567 3008 break; 2568 3009 … … 2574 3015 #endif 2575 3016 case CMD_highlight: 2576 @@ -3997,8 +40 25,7 @@3017 @@ -3997,8 +4054,7 @@ 2577 3018 eap->errmsg = (char_u *)N_("E319: Sorry, the command is not available in this version"); 2578 3019 } … … 2584 3025 * Function called for script command which is Not Implemented. NI! 2585 3026 * Skips over ":perl <<EOF" constructs. 2586 @@ -4376,7 +44 03,7 @@3027 @@ -4376,7 +4432,7 @@ 2587 3028 || vim_strchr(eap->arg, '~') != NULL) 2588 3029 { … … 2593 3034 p = NameBuff; 2594 3035 } 2595 @@ -4492,7 +45 19,8 @@3036 @@ -4492,7 +4548,8 @@ 2596 3037 if (eap->argt & (USECTRLV | XFILE)) 2597 3038 ++p; /* skip CTRL-V and next char */ … … 2603 3044 break; 2604 3045 } 2605 @@ -8399,21 +8427,17 @@ 3046 @@ -6650,7 +6707,7 @@ 3047 * The list should be allocated using alloc(), as should each item in the 3048 * list. This function takes over responsibility for freeing the list. 3049 * 3050 - * XXX The list is made into the arggument list. This is freed using 3051 + * XXX The list is made into the argument list. This is freed using 3052 * FreeWild(), which does a series of vim_free() calls, unless the two defines 3053 * __EMX__ and __ALWAYS_HAS_TRAILING_NUL_POINTER are set. In this case, a 3054 * routine _fnexplodefree() is used. This may cause problems, but as the drop 3055 @@ -7768,7 +7825,7 @@ 3056 if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() 3057 && !eap->forceit) 3058 { 3059 - EMSG(_("E747: Cannot change directory, buffer is modifed (add ! to override)")); 3060 + EMSG(_("E747: Cannot change directory, buffer is modified (add ! to override)")); 3061 return; 3062 } 3063 3064 @@ -8399,21 +8456,17 @@ 2606 3065 || *arg == '"') 2607 3066 { … … 2632 3091 } 2633 3092 if (*arg != NUL) 2634 @@ -10816,12 +10840,13 @@ 3093 @@ -9368,7 +9421,7 @@ 3094 if (src > srcstart && src[-1] == '\\') 3095 { 3096 *usedlen = 0; 3097 - STRCPY(src - 1, src); /* remove backslash */ 3098 + mch_memmove(src - 1, src, STRLEN(src) + 1); /* remove backslash */ 3099 return NULL; 3100 } 3101 3102 @@ -10816,12 +10869,13 @@ 2635 3103 exarg_T *eap; 2636 3104 { … … 2648 3116 { 2649 3117 EMSG(e_invcmd); 2650 @@ -10830,13 +108 55,7 @@3118 @@ -10830,13 +10884,7 @@ 2651 3119 2652 3120 /* First clear any old pattern. */ … … 2663 3131 if (ends_excmd(*eap->arg)) 2664 3132 end = eap->arg; 2665 @@ -10847,15 +108 66,7 @@3133 @@ -10847,15 +10895,7 @@ 2666 3134 { 2667 3135 p = skiptowhite(eap->arg); … … 2680 3148 if (*p == NUL) 2681 3149 { 2682 @@ -10879,14 +10 890,8 @@3150 @@ -10879,14 +10919,8 @@ 2683 3151 2684 3152 c = *end; … … 2698 3166 } 2699 3167 diff -Naur vim71.orig/src/ex_eval.c vim71/src/ex_eval.c 2700 --- vim71.orig/src/ex_eval.c 2007-05-07 1 2:47:50.000000000 -07002701 +++ vim71/src/ex_eval.c 2007-1 0-29 08:09:18.000000000 -07003168 --- vim71.orig/src/ex_eval.c 2007-05-07 15:47:50.000000000 -0400 3169 +++ vim71/src/ex_eval.c 2007-12-20 23:59:51.000000000 -0500 2702 3170 @@ -1551,7 +1551,7 @@ 2703 3171 } … … 2709 3177 if (end != NULL) 2710 3178 *end = save_char; 3179 @@ -2269,9 +2269,18 @@ 3180 has_loop_cmd(p) 3181 char_u *p; 3182 { 3183 - p = skipwhite(p); 3184 - while (*p == ':') 3185 - p = skipwhite(p + 1); 3186 + int len; 3187 + 3188 + /* skip modifiers, white space and ':' */ 3189 + for (;;) 3190 + { 3191 + while (*p == ' ' || *p == '\t' || *p == ':') 3192 + ++p; 3193 + len = modifier_len(p); 3194 + if (len == 0) 3195 + break; 3196 + p += len; 3197 + } 3198 if ((p[0] == 'w' && p[1] == 'h') 3199 || (p[0] == 'f' && p[1] == 'o' && p[2] == 'r')) 3200 return TRUE; 2711 3201 diff -Naur vim71.orig/src/ex_getln.c vim71/src/ex_getln.c 2712 --- vim71.orig/src/ex_getln.c 2007-05-07 1 2:47:23.000000000 -07002713 +++ vim71/src/ex_getln.c 2007-1 0-29 08:09:43.000000000 -07003202 --- vim71.orig/src/ex_getln.c 2007-05-07 15:47:23.000000000 -0400 3203 +++ vim71/src/ex_getln.c 2007-12-21 00:00:02.000000000 -0500 2714 3204 @@ -268,7 +268,9 @@ 2715 3205 { … … 2780 3270 #ifdef FEAT_EVAL 2781 3271 /* 2782 @@ -2090,11 +2095,11 @@ 3272 @@ -1181,10 +1186,10 @@ 3273 case K_LEFT: 3274 case K_S_LEFT: 3275 case K_C_LEFT: 3276 + if (ccline.cmdpos == 0) 3277 + goto cmdline_not_changed; 3278 do 3279 { 3280 - if (ccline.cmdpos == 0) 3281 - break; 3282 --ccline.cmdpos; 3283 #ifdef FEAT_MBYTE 3284 if (has_mbyte) /* move to first byte of char */ 3285 @@ -1193,7 +1198,8 @@ 3286 #endif 3287 ccline.cmdspos -= cmdline_charsize(ccline.cmdpos); 3288 } 3289 - while ((c == K_S_LEFT || c == K_C_LEFT 3290 + while (ccline.cmdpos > 0 3291 + && (c == K_S_LEFT || c == K_C_LEFT 3292 || (mod_mask & (MOD_MASK_SHIFT|MOD_MASK_CTRL))) 3293 && ccline.cmdbuff[ccline.cmdpos - 1] != ' '); 3294 #ifdef FEAT_MBYTE 3295 @@ -2090,11 +2096,11 @@ 2783 3296 garray_T line_ga; 2784 3297 char_u *pend; … … 2794 3307 /* Switch cursor on now. This avoids that it happens after the "\n", which 2795 3308 * confuses the system function that computes tabstops. */ 2796 @@ -2147,6 +215 2,7 @@3309 @@ -2147,6 +2153,7 @@ 2797 3310 2798 3311 /* Get one character at a time. Don't use inchar(), it can't handle … … 2802 3315 2803 3316 /* 2804 @@ -2204,7 +221 0,6 @@3317 @@ -2204,7 +2211,6 @@ 2805 3318 redraw: 2806 3319 /* redraw the line */ … … 2810 3323 for (p = (char_u *)line_ga.ga_data; 2811 3324 p < (char_u *)line_ga.ga_data + line_ga.ga_len; ++p) 2812 @@ -2223,6 +222 8,7 @@3325 @@ -2223,6 +2229,7 @@ 2813 3326 } 2814 3327 } … … 2818 3331 } 2819 3332 2820 @@ -2268,7 +227 4,6 @@3333 @@ -2268,7 +2275,6 @@ 2821 3334 if (IS_SPECIAL(c1)) 2822 3335 c1 = '?'; … … 2826 3339 msg_putchar('\n'); 2827 3340 else if (c1 == TAB) 2828 @@ -3311,6 +331 6,10 @@3341 @@ -3311,6 +3317,10 @@ 2829 3342 * Return a pointer to alloced memory containing the new string. 2830 3343 * Return NULL for failure. … … 2837 3350 * is WILD_EXPAND_FREE or WILD_ALL. 2838 3351 * 2839 @@ -3395,7 +3404,7 @@ 3352 @@ -3344,6 +3354,7 @@ 3353 char_u *ss = NULL; 3354 static int findex; 3355 static char_u *orig_save = NULL; /* kept value of orig */ 3356 + int orig_saved = FALSE; 3357 int i; 3358 long_u len; 3359 int non_suf_match; /* number without matching suffix */ 3360 @@ -3395,7 +3406,7 @@ 2840 3361 return NULL; 2841 3362 } … … 2846 3367 { 2847 3368 FreeWild(xp->xp_numfiles, xp->xp_files); 2848 @@ -3536,6 +3545,10 @@ 3369 @@ -3412,6 +3423,7 @@ 3370 { 3371 vim_free(orig_save); 3372 orig_save = orig; 3373 + orig_saved = TRUE; 3374 3375 /* 3376 * Do the expansion. 3377 @@ -3536,6 +3548,10 @@ 2849 3378 if (mode == WILD_EXPAND_FREE || mode == WILD_ALL) 2850 3379 ExpandCleanup(xp); 2851 3380 2852 3381 + /* Free "orig" if it wasn't stored in "orig_save". */ 2853 + if ( orig != orig_save)3382 + if (!orig_saved) 2854 3383 + vim_free(orig); 2855 3384 + … … 2857 3386 } 2858 3387 2859 @@ -4148,13 +416 1,19 @@3388 @@ -4148,13 +4164,19 @@ 2860 3389 2861 3390 #ifdef FEAT_EVAL … … 2877 3406 else 2878 3407 #endif 2879 @@ -4295,10 +431 4,11 @@3408 @@ -4295,10 +4317,11 @@ 2880 3409 && pat[i + 1] == '\\' 2881 3410 && pat[i + 2] == '\\' … … 2891 3420 } 2892 3421 2893 @@ -4502,6 +452 2,12 @@3422 @@ -4502,6 +4525,12 @@ 2894 3423 if (xp->xp_context != EXPAND_MENUNAMES && xp->xp_context != EXPAND_MENUS) 2895 3424 sort_strings(*file, *num_file); … … 2904 3433 } 2905 3434 2906 @@ -4535,7 +456 1,7 @@3435 @@ -4535,7 +4564,7 @@ 2907 3436 pat = vim_strsave(filepat); 2908 3437 for (i = 0; pat[i]; ++i) … … 2913 3442 flags |= EW_FILE | EW_EXEC; 2914 3443 2915 @@ -5907,7 +593 3,7 @@3444 @@ -5907,7 +5936,7 @@ 2916 3445 2917 3446 # ifdef FEAT_AUTOCMD … … 2922 3451 /* don't use a new tab page */ 2923 3452 cmdmod.tab = 0; 2924 @@ -5916,6 +594 2,9 @@3453 @@ -5916,6 +5945,9 @@ 2925 3454 if (win_split((int)p_cwh, WSP_BOT) == FAIL) 2926 3455 { … … 2932 3461 } 2933 3462 cmdwin_type = ccline.cmdfirstc; 2934 @@ -5938,7 +59 67,7 @@3463 @@ -5938,7 +5970,7 @@ 2935 3464 2936 3465 # ifdef FEAT_AUTOCMD … … 2941 3470 2942 3471 /* Showing the prompt may have set need_wait_return, reset it. */ 2943 @@ -6092,7 +612 1,7 @@3472 @@ -6092,7 +6124,7 @@ 2944 3473 2945 3474 # ifdef FEAT_AUTOCMD … … 2950 3479 wp = curwin; 2951 3480 bp = curbuf; 2952 @@ -6104,7 +613 3,7 @@3481 @@ -6104,7 +6136,7 @@ 2953 3482 win_size_restore(&winsizes); 2954 3483 … … 2960 3489 2961 3490 diff -Naur vim71.orig/src/feature.h vim71/src/feature.h 2962 --- vim71.orig/src/feature.h 2007-05-07 1 2:33:19.000000000 -07002963 +++ vim71/src/feature.h 2007-1 0-29 08:09:18.000000000 -07003491 --- vim71.orig/src/feature.h 2007-05-07 15:33:19.000000000 -0400 3492 +++ vim71/src/feature.h 2007-12-20 23:57:30.000000000 -0500 2964 3493 @@ -673,7 +673,7 @@ 2965 3494 # define ESC_CHG_TO_ENG_MODE /* if defined, when ESC pressed, … … 2972 3501 # if defined(FEAT_XIM) && !defined(LINT) 2973 3502 diff -Naur vim71.orig/src/fileio.c vim71/src/fileio.c 2974 --- vim71.orig/src/fileio.c 2007-05-10 0 4:29:44.000000000 -07002975 +++ vim71/src/fileio.c 2007-1 0-29 08:09:48.000000000 -07003503 --- vim71.orig/src/fileio.c 2007-05-10 07:29:44.000000000 -0400 3504 +++ vim71/src/fileio.c 2007-12-20 23:59:40.000000000 -0500 2976 3505 @@ -44,6 +44,10 @@ 2977 3506 /* Is there any system that doesn't have access()? */ … … 3108 3637 * 3109 3638 * We do our own buffering here because fwrite() is so slow. 3110 @@ -3219,17 +3286,8 @@ 3639 @@ -3142,7 +3209,8 @@ 3640 * Get information about original file (if there is one). 3641 */ 3642 #if defined(UNIX) && !defined(ARCHIE) 3643 - st_old.st_dev = st_old.st_ino = 0; 3644 + st_old.st_dev = 0; 3645 + st_old.st_ino = 0; 3646 perm = -1; 3647 if (mch_stat((char *)fname, &st_old) < 0) 3648 newfile = TRUE; 3649 @@ -3219,17 +3287,8 @@ 3111 3650 * Check if the file is really writable (when renaming the file to 3112 3651 * make a backup we won't discover it later). … … 3128 3667 { 3129 3668 if (vim_strchr(p_cpo, CPO_FWRITE) != NULL) 3130 @@ -5495,6 +555 3,8 @@3669 @@ -5495,6 +5554,8 @@ 3131 3670 } 3132 3671 #endif … … 3137 3676 * Try to find a shortname by comparing the fullname with the current 3138 3677 * directory. 3139 @@ -5548,6 +560 8,7 @@3678 @@ -5548,6 +5609,7 @@ 3140 3679 p = NULL; 3141 3680 return p; … … 3145 3684 /* 3146 3685 * Shorten filenames for all buffers. 3147 @@ -7107,6 +716 8,7 @@3686 @@ -7107,6 +7169,7 @@ 3148 3687 3149 3688 static event_T last_event; … … 3153 3692 /* 3154 3693 * Show the autocommands for one AutoPat. 3155 @@ -8396,7 +845 8,7 @@3694 @@ -8396,7 +8459,7 @@ 3156 3695 * Quickly return if there are no autocommands for this event or 3157 3696 * autocommands are blocked. … … 3162 3701 3163 3702 /* 3164 @@ -8710,6 +877 2,40 @@3703 @@ -8710,6 +8773,40 @@ 3165 3704 return retval; 3166 3705 } … … 3204 3743 */ 3205 3744 diff -Naur vim71.orig/src/fold.c vim71/src/fold.c 3206 --- vim71.orig/src/fold.c 2007-05-07 1 2:46:32.000000000 -07003207 +++ vim71/src/fold.c 2007-1 0-29 08:09:51.000000000 -07003745 --- vim71.orig/src/fold.c 2007-05-07 15:46:32.000000000 -0400 3746 +++ vim71/src/fold.c 2007-12-20 23:59:22.000000000 -0500 3208 3747 @@ -858,7 +858,14 @@ 3209 3748 || foldmethodIsDiff(wp) … … 3222 3761 /* foldUpdateAll() {{{2 */ 3223 3762 diff -Naur vim71.orig/src/getchar.c vim71/src/getchar.c 3224 --- vim71.orig/src/getchar.c 2007-05-07 12:18:20.000000000 -0700 3225 +++ vim71/src/getchar.c 2007-10-29 08:09:37.000000000 -0700 3226 @@ -1596,8 +1596,16 @@ 3763 --- vim71.orig/src/getchar.c 2007-05-07 15:18:20.000000000 -0400 3764 +++ vim71/src/getchar.c 2007-12-21 00:00:01.000000000 -0500 3765 @@ -253,8 +253,9 @@ 3766 return; 3767 } 3768 else if (buf->bh_index != 0) 3769 - STRCPY(buf->bh_first.b_next->b_str, 3770 - buf->bh_first.b_next->b_str + buf->bh_index); 3771 + mch_memmove(buf->bh_first.b_next->b_str, 3772 + buf->bh_first.b_next->b_str + buf->bh_index, 3773 + STRLEN(buf->bh_first.b_next->b_str + buf->bh_index) + 1); 3774 buf->bh_index = 0; 3775 3776 if (buf->bh_space >= (int)slen) 3777 @@ -1596,8 +1597,16 @@ 3227 3778 continue; 3228 3779 } … … 3242 3793 * it being recognized as the start of a special key. */ 3243 3794 if (c == K_CSI) 3244 @@ -1741,6 +17 49,22 @@3795 @@ -1741,6 +1750,22 @@ 3245 3796 } 3246 3797 … … 3266 3817 * character is not valid!. 3267 3818 diff -Naur vim71.orig/src/globals.h vim71/src/globals.h 3268 --- vim71.orig/src/globals.h 2007-05-07 1 2:44:26.000000000 -07003269 +++ vim71/src/globals.h 2007-1 0-29 08:09:40.000000000 -07003819 --- vim71.orig/src/globals.h 2007-05-07 15:44:26.000000000 -0400 3820 +++ vim71/src/globals.h 2007-12-20 23:59:05.000000000 -0500 3270 3821 @@ -301,13 +301,17 @@ 3271 3822 #endif … … 3306 3857 3307 3858 diff -Naur vim71.orig/src/gui.c vim71/src/gui.c 3308 --- vim71.orig/src/gui.c 2007-05-07 1 2:50:55.000000000 -07003309 +++ vim71/src/gui.c 2007-1 0-29 08:09:37.000000000 -07003859 --- vim71.orig/src/gui.c 2007-05-07 15:50:55.000000000 -0400 3860 +++ vim71/src/gui.c 2007-12-20 23:59:35.000000000 -0500 3310 3861 @@ -1080,7 +1080,8 @@ 3311 3862 cur_width = gui.char_width; … … 3327 3878 text_area_y += gui.tabline_height; 3328 3879 #endif 3329 @@ -4518,7 +4519,18 @@ 3880 @@ -4213,7 +4214,19 @@ 3881 #endif 3882 ) 3883 { 3884 - redraw_win_later(wp, VALID); 3885 + int type = VALID; 3886 + 3887 +#ifdef FEAT_INS_EXPAND 3888 + if (pum_visible()) 3889 + { 3890 + type = NOT_VALID; 3891 + wp->w_lines_valid = 0; 3892 + } 3893 +#endif 3894 + /* Don't set must_redraw here, it may cause the popup menu to 3895 + * disappear when losing focus after a scrollbar drag. */ 3896 + if (wp->w_redr_type < type) 3897 + wp->w_redr_type = type; 3898 updateWindow(wp); /* update window, status line, and cmdline */ 3899 } 3900 3901 @@ -4518,7 +4531,18 @@ 3330 3902 xim_set_focus(in_focus); 3331 3903 # endif … … 3347 3919 } 3348 3920 3349 @@ -5117,7 +51 29,7 @@3921 @@ -5117,7 +5141,7 @@ 3350 3922 p = vim_strsave_escaped(fnames[i], (char_u *)"\\ \t\"|"); 3351 3923 # endif … … 3357 3929 } 3358 3930 diff -Naur vim71.orig/src/gui_gtk.c vim71/src/gui_gtk.c 3359 --- vim71.orig/src/gui_gtk.c 2007-05-10 0 1:37:37.000000000 -07003360 +++ vim71/src/gui_gtk.c 2007-1 0-29 08:09:23.000000000 -07003931 --- vim71.orig/src/gui_gtk.c 2007-05-10 04:37:37.000000000 -0400 3932 +++ vim71/src/gui_gtk.c 2007-12-20 23:57:55.000000000 -0500 3361 3933 @@ -53,8 +53,8 @@ 3362 3934 # ifdef bindtextdomain … … 3403 3975 { 3404 3976 diff -Naur vim71.orig/src/gui_gtk_x11.c vim71/src/gui_gtk_x11.c 3405 --- vim71.orig/src/gui_gtk_x11.c 2007-05-10 0 1:37:49.000000000 -07003406 +++ vim71/src/gui_gtk_x11.c 2007-1 0-29 08:09:51.000000000 -07003977 --- vim71.orig/src/gui_gtk_x11.c 2007-05-10 04:37:49.000000000 -0400 3978 +++ vim71/src/gui_gtk_x11.c 2007-12-20 23:59:24.000000000 -0500 3407 3979 @@ -36,8 +36,8 @@ 3408 3980 # ifdef bindtextdomain … … 3533 4105 init_window_hints_state = 1; 3534 4106 g_timeout_add(1000, check_startup_plug_hints, NULL); 4107 diff -Naur vim71.orig/src/gui_xmebw.c vim71/src/gui_xmebw.c 4108 --- vim71.orig/src/gui_xmebw.c 2007-05-07 15:30:49.000000000 -0400 4109 +++ vim71/src/gui_xmebw.c 2007-12-20 23:59:40.000000000 -0500 4110 @@ -395,11 +395,15 @@ 4111 4112 /* Create the "highlight" pixmap. */ 4113 color[4].pixel = eb->primitive.bottom_shadow_color; 4114 +#ifdef XpmAllocColor /* SGI doesn't have it */ 4115 attr.valuemask = XpmColorSymbols | XpmCloseness | XpmAllocColor; 4116 + attr.alloc_color = alloc_color; 4117 +#else 4118 + attr.valuemask = XpmColorSymbols | XpmCloseness; 4119 +#endif 4120 attr.closeness = 65535; /* accuracy isn't crucial */ 4121 attr.colorsymbols = color; 4122 attr.numsymbols = XtNumber(color); 4123 - attr.alloc_color = alloc_color; 4124 4125 status = XpmCreatePixmapFromData(dpy, root, data, &pix, NULL, &attr); 4126 XpmFreeAttributes(&attr); 3535 4127 diff -Naur vim71.orig/src/if_cscope.c vim71/src/if_cscope.c 3536 --- vim71.orig/src/if_cscope.c 2007-03-11 07:29:57.000000000 -07003537 +++ vim71/src/if_cscope.c 2007-1 0-29 08:09:37.000000000 -07004128 --- vim71.orig/src/if_cscope.c 2007-03-11 10:29:57.000000000 -0400 4129 +++ vim71/src/if_cscope.c 2007-12-20 23:58:44.000000000 -0500 3538 4130 @@ -24,11 +24,6 @@ 3539 4131 /* not UNIX, must be WIN32 */ … … 3945 4537 /* the end */ 3946 4538 diff -Naur vim71.orig/src/if_cscope.h vim71/src/if_cscope.h 3947 --- vim71.orig/src/if_cscope.h 2005-06-30 1 0:14:22.000000000 -07003948 +++ vim71/src/if_cscope.h 2007-1 0-29 08:09:37.000000000 -07004539 --- vim71.orig/src/if_cscope.h 2005-06-30 13:14:22.000000000 -0400 4540 +++ vim71/src/if_cscope.h 2007-12-20 23:58:34.000000000 -0500 3949 4541 @@ -72,7 +72,7 @@ 3950 4542 ino_t st_ino; /* inode number of cscope db */ … … 3957 4549 DWORD nIndexHigh; /* st_ino has no meaning in the Windows */ 3958 4550 diff -Naur vim71.orig/src/if_mzsch.c vim71/src/if_mzsch.c 3959 --- vim71.orig/src/if_mzsch.c 2007-05-12 0 4:13:47.000000000 -07003960 +++ vim71/src/if_mzsch.c 2007-1 0-29 08:09:16.000000000 -07004551 --- vim71.orig/src/if_mzsch.c 2007-05-12 07:13:47.000000000 -0400 4552 +++ vim71/src/if_mzsch.c 2007-12-20 23:56:55.000000000 -0500 3961 4553 @@ -308,6 +308,8 @@ 3962 4554 static Scheme_Config *(*dll_scheme_current_config)(void); … … 4003 4595 #ifdef HAVE_SANDBOX 4004 4596 diff -Naur vim71.orig/src/if_perl.xs vim71/src/if_perl.xs 4005 --- vim71.orig/src/if_perl.xs 2006-08-16 0 5:45:15.000000000 -07004006 +++ vim71/src/if_perl.xs 2007-1 0-29 08:09:51.000000000 -07004597 --- vim71.orig/src/if_perl.xs 2006-08-16 08:45:15.000000000 -0400 4598 +++ vim71/src/if_perl.xs 2007-12-20 23:59:21.000000000 -0500 4007 4599 @@ -40,6 +40,28 @@ 4008 4600 # define PERL_SUBVERSION SUBVERSION … … 4084 4676 4085 4677 diff -Naur vim71.orig/src/if_ruby.c vim71/src/if_ruby.c 4086 --- vim71.orig/src/if_ruby.c 2007-05-12 0 2:54:12.000000000 -07004087 +++ vim71/src/if_ruby.c 2007-1 0-29 08:09:37.000000000 -07004678 --- vim71.orig/src/if_ruby.c 2007-05-12 05:54:12.000000000 -0400 4679 +++ vim71/src/if_ruby.c 2007-12-20 23:58:35.000000000 -0500 4088 4680 @@ -789,7 +789,7 @@ 4089 4681 return get_buffer_line(curbuf, curwin->w_cursor.lnum); … … 4096 4688 } 4097 4689 diff -Naur vim71.orig/src/keymap.h vim71/src/keymap.h 4098 --- vim71.orig/src/keymap.h 2006-08-22 0 4:38:38.000000000 -07004099 +++ vim71/src/keymap.h 2007-1 0-29 08:09:37.000000000 -07004690 --- vim71.orig/src/keymap.h 2006-08-22 07:38:38.000000000 -0400 4691 +++ vim71/src/keymap.h 2007-12-20 23:58:27.000000000 -0500 4100 4692 @@ -254,6 +254,8 @@ 4101 4693 , KE_DROP /* DnD data is available */ … … 4117 4709 4118 4710 diff -Naur vim71.orig/src/macros.h vim71/src/macros.h 4119 --- vim71.orig/src/macros.h 2007-05-07 1 2:38:22.000000000 -07004120 +++ vim71/src/macros.h 2007-1 0-29 08:09:28.000000000 -07004711 --- vim71.orig/src/macros.h 2007-05-07 15:38:22.000000000 -0400 4712 +++ vim71/src/macros.h 2007-12-20 23:58:07.000000000 -0500 4121 4713 @@ -54,10 +54,12 @@ 4122 4714 … … 4135 4727 # define TOUPPER_LOC(c) toupper_tab[(c) & 255] 4136 4728 diff -Naur vim71.orig/src/main.aap vim71/src/main.aap 4137 --- vim71.orig/src/main.aap 2007-05-07 1 2:46:43.000000000 -07004138 +++ vim71/src/main.aap 2007-1 0-29 08:09:38.000000000 -07004729 --- vim71.orig/src/main.aap 2007-05-07 15:46:43.000000000 -0400 4730 +++ vim71/src/main.aap 2007-12-20 23:59:01.000000000 -0500 4139 4731 @@ -56,9 +56,16 @@ 4140 4732 config {virtual} auto/config.h auto/config.aap : … … 4174 4766 # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9) 4175 4767 diff -Naur vim71.orig/src/main.c vim71/src/main.c 4176 --- vim71.orig/src/main.c 2007-05-07 1 2:38:44.000000000 -07004177 +++ vim71/src/main.c 2007-1 0-29 08:09:38.000000000 -07004768 --- vim71.orig/src/main.c 2007-05-07 15:38:44.000000000 -0400 4769 +++ vim71/src/main.c 2007-12-20 23:58:59.000000000 -0500 4178 4770 @@ -954,7 +954,8 @@ 4179 4771 int cmdwin; /* TRUE when working in the command-line window */ … … 4263 4855 ga_concat(&ga, (char_u *)"<C-\\><C-N>:cd "); 4264 4856 diff -Naur vim71.orig/src/mbyte.c vim71/src/mbyte.c 4265 --- vim71.orig/src/mbyte.c 2007-05-07 1 2:47:09.000000000 -07004266 +++ vim71/src/mbyte.c 2007-1 0-29 08:09:37.000000000 -07004857 --- vim71.orig/src/mbyte.c 2007-05-07 15:47:09.000000000 -0400 4858 +++ vim71/src/mbyte.c 2007-12-20 23:58:25.000000000 -0500 4267 4859 @@ -1310,20 +1310,26 @@ 4268 4860 /* … … 4334 4926 # if defined(FEAT_CLIPBOARD) || defined(FEAT_GUI) || defined(FEAT_RIGHTLEFT) \ 4335 4927 diff -Naur vim71.orig/src/message.c vim71/src/message.c 4336 --- vim71.orig/src/message.c 2007-05-07 1 2:31:59.000000000 -07004337 +++ vim71/src/message.c 2007-1 0-29 08:09:37.000000000 -07004928 --- vim71.orig/src/message.c 2007-05-07 15:31:59.000000000 -0400 4929 +++ vim71/src/message.c 2007-12-20 23:59:49.000000000 -0500 4338 4930 @@ -828,7 +828,7 @@ 4339 4931 _("Messages maintainer: Bram Moolenaar <Bram@vim.org>"), … … 4426 5018 /* displayed the requested text, more prompt again */ 4427 5019 screen_fill((int)Rows - 1, (int)Rows, 0, 4428 @@ -3456,11 +3458,11 @@ 5020 @@ -2848,6 +2850,15 @@ 5021 } 5022 else if (State == HITRETURN || State == SETWSIZE) 5023 { 5024 + if (msg_row == Rows - 1) 5025 + { 5026 + /* Avoid drawing the "hit-enter" prompt below the previous one, 5027 + * overwrite it. Esp. useful when regaining focus and a 5028 + * FocusGained autocmd exists but didn't draw anything. */ 5029 + msg_didout = FALSE; 5030 + msg_col = 0; 5031 + msg_clr_eos(); 5032 + } 5033 hit_return_msg(); 5034 msg_row = Rows - 1; 5035 } 5036 @@ -3456,11 +3467,11 @@ 4429 5037 /* advance to next hotkey and set default hotkey */ 4430 5038 #ifdef FEAT_MBYTE … … 4440 5048 --dfltbutton; 4441 5049 4442 @@ -3493,7 +3 495,7 @@5050 @@ -3493,7 +3504,7 @@ 4443 5051 *msgp++ = (dfltbutton == 1) ? ']' : ')'; 4444 5052 … … 4449 5057 } 4450 5058 else 4451 @@ -3519,8 +35 21,6 @@5059 @@ -3519,8 +3530,6 @@ 4452 5060 *msgp++ = ':'; 4453 5061 *msgp++ = ' '; … … 4458 5066 else 4459 5067 { 4460 @@ -3555,8 +35 55,9 @@5068 @@ -3555,8 +3564,9 @@ 4461 5069 msgp = confirm_msg + 1 + STRLEN(message); 4462 5070 hotkp = hotk; … … 4471 5079 * "hotkp" typed at the more prompt. */ 4472 5080 diff -Naur vim71.orig/src/misc1.c vim71/src/misc1.c 4473 --- vim71.orig/src/misc1.c 2007-05-07 1 2:49:03.000000000 -07004474 +++ vim71/src/misc1.c 2007-1 0-29 08:09:38.000000000 -07005081 --- vim71.orig/src/misc1.c 2007-05-07 15:49:03.000000000 -0400 5082 +++ vim71/src/misc1.c 2007-12-20 23:59:02.000000000 -0500 4475 5083 @@ -90,7 +90,7 @@ 4476 5084 */ … … 4791 5399 #ifdef UNIX 4792 5400 diff -Naur vim71.orig/src/misc2.c vim71/src/misc2.c 4793 --- vim71.orig/src/misc2.c 2007-05-07 12:49:26.000000000 -0700 4794 +++ vim71/src/misc2.c 2007-10-29 08:09:51.000000000 -0700 4795 @@ -972,7 +972,7 @@ 5401 --- vim71.orig/src/misc2.c 2007-05-07 15:49:26.000000000 -0400 5402 +++ vim71/src/misc2.c 2007-12-20 23:59:50.000000000 -0500 5403 @@ -964,7 +964,6 @@ 5404 { 5405 buf_T *buf, *nextbuf; 5406 static int entered = FALSE; 5407 - win_T *win; 5408 5409 /* When we cause a crash here it is caught and Vim tries to exit cleanly. 5410 * Don't try freeing everything again. */ 5411 @@ -972,15 +971,17 @@ 4796 5412 return; 4797 5413 entered = TRUE; 4798 5414 4799 5415 - ++autocmd_block; /* don't want to trigger autocommands here */ 5416 +# ifdef FEAT_AUTOCMD 4800 5417 + block_autocmds(); /* don't want to trigger autocommands here */ 4801 4802 #ifdef FEAT_WINDOWS 5418 +# endif 5419 5420 -#ifdef FEAT_WINDOWS 5421 +# ifdef FEAT_WINDOWS 4803 5422 /* close all tabs and windows */ 4804 @@ -1037,7 +1037,9 @@ 5423 if (first_tabpage->tp_next != NULL) 5424 do_cmdline_cmd((char_u *)"tabonly!"); 5425 if (firstwin != lastwin) 5426 do_cmdline_cmd((char_u *)"only!"); 5427 -#endif 5428 +# endif 5429 5430 # if defined(FEAT_SPELL) 5431 /* Free all spell info. */ 5432 @@ -1031,27 +1032,41 @@ 5433 free_regexp_stuff(); 5434 free_tag_stuff(); 5435 free_cd_dir(); 5436 +# ifdef FEAT_EVAL 5437 set_expr_line(NULL); 5438 +# endif 5439 +# ifdef FEAT_DIFF 5440 diff_clear(curtab); 5441 +# endif 5442 clear_sb_text(); /* free any scrollback text */ 4805 5443 4806 5444 /* Free some global vars. */ … … 4810 5448 +# endif 4811 5449 vim_free(last_cmdline); 5450 +# ifdef FEAT_CMDHIST 4812 5451 vim_free(new_last_cmdline); 5452 +# endif 4813 5453 set_keep_msg(NULL, 0); 5454 vim_free(ff_expand_buffer); 5455 5456 /* Clear cmdline history. */ 5457 p_hi = 0; 5458 +# ifdef FEAT_CMDHIST 5459 init_history(); 5460 +# endif 5461 5462 #ifdef FEAT_QUICKFIX 5463 - qf_free_all(NULL); 5464 - /* Free all location lists */ 5465 - FOR_ALL_WINDOWS(win) 5466 - qf_free_all(win); 5467 + { 5468 + win_T *win; 5469 + 5470 + qf_free_all(NULL); 5471 + /* Free all location lists */ 5472 + FOR_ALL_WINDOWS(win) 5473 + qf_free_all(win); 5474 + } 5475 #endif 5476 5477 /* Close all script inputs. */ 5478 @@ -5922,7 +5937,11 @@ 5479 { 5480 if (emsg_not_now()) 5481 return TRUE; /* no error messages at the moment */ 5482 +#ifdef HAVE_STDARG_H 5483 + vim_snprintf((char *)IObuff, IOSIZE, (char *)s, a1, a2); 5484 +#else 5485 vim_snprintf((char *)IObuff, IOSIZE, (char *)s, (long_u)a1, (long_u)a2); 5486 +#endif 5487 return emsg(IObuff); 5488 } 5489 4814 5490 diff -Naur vim71.orig/src/normal.c vim71/src/normal.c 4815 --- vim71.orig/src/normal.c 2007-05-07 1 2:34:39.000000000 -07004816 +++ vim71/src/normal.c 2007-1 0-29 08:09:51.000000000 -07005491 --- vim71.orig/src/normal.c 2007-05-07 15:34:39.000000000 -0400 5492 +++ vim71/src/normal.c 2007-12-20 23:59:23.000000000 -0500 4817 5493 @@ -690,13 +690,20 @@ 4818 5494 ca.count0 = ca.count0 * 10 + (c - '0'); … … 4968 5644 cap->oap->inclusive = TRUE; 4969 5645 diff -Naur vim71.orig/src/ops.c vim71/src/ops.c 4970 --- vim71.orig/src/ops.c 2007-05-07 12:33:47.000000000 -0700 4971 +++ vim71/src/ops.c 2007-10-29 08:09:38.000000000 -0700 4972 @@ -2477,7 +2477,7 @@ 5646 --- vim71.orig/src/ops.c 2007-05-07 15:33:47.000000000 -0400 5647 +++ vim71/src/ops.c 2007-12-20 23:59:56.000000000 -0500 5648 @@ -927,15 +927,16 @@ 5649 int name; 5650 int copy; /* make a copy, if FALSE make register empty. */ 5651 { 5652 - static struct yankreg *reg; 5653 - int i; 5654 + struct yankreg *reg; 5655 + int i; 5656 5657 #ifdef FEAT_CLIPBOARD 5658 /* When Visual area changed, may have to update selection. Obtain the 5659 * selection too. */ 5660 - if (name == '*' && clip_star.available && clip_isautosel()) 5661 + if (name == '*' && clip_star.available) 5662 { 5663 - clip_update_selection(); 5664 + if (clip_isautosel()) 5665 + clip_update_selection(); 5666 may_get_selection(name); 5667 } 5668 #endif 5669 @@ -966,7 +967,7 @@ 5670 } 5671 5672 /* 5673 - * Put "reg" into register "name". Free any previous contents. 5674 + * Put "reg" into register "name". Free any previous contents and "reg". 5675 */ 5676 void 5677 put_register(name, reg) 5678 @@ -976,6 +977,7 @@ 5679 get_yank_register(name, 0); 5680 free_yank_all(); 5681 *y_current = *(struct yankreg *)reg; 5682 + vim_free(reg); 5683 5684 # ifdef FEAT_CLIPBOARD 5685 /* Send text written to clipboard register to the clipboard. */ 5686 @@ -2477,7 +2479,7 @@ 4973 5687 4974 5688 /* … … 4979 5693 */ 4980 5694 block_prep(oap, &bd2, oap->start.lnum, TRUE); 4981 @@ -2534,7 +253 4,9 @@5695 @@ -2534,7 +2536,9 @@ 4982 5696 #ifdef FEAT_VISUALEXTRA 4983 5697 long offset; … … 4990 5704 char_u *ins_text, *newp, *oldp; 4991 5705 struct block_def bd; 4992 @@ -2579,7 +258 1,9 @@5706 @@ -2579,7 +2583,9 @@ 4993 5707 || gchar_cursor() == NUL)) 4994 5708 coladvance_force(getviscol()); … … 5001 5715 } 5002 5716 #endif 5003 @@ -2598,13 +260 2,22 @@5717 @@ -2598,13 +2604,22 @@ 5004 5718 */ 5005 5719 if (oap->block_mode && oap->start.lnum != oap->end.lnum) … … 5029 5743 { 5030 5744 vim_strncpy(ins_text, firstline + bd.textcol, (size_t)ins_len); 5031 @@ -3404,7 +341 7,9 @@5745 @@ -3404,7 +3419,9 @@ 5032 5746 5033 5747 #ifdef FEAT_VIRTUALEDIT … … 5041 5755 ++col; 5042 5756 diff -Naur vim71.orig/src/option.c vim71/src/option.c 5043 --- vim71.orig/src/option.c 2007-05-01 0 4:26:10.000000000 -07005044 +++ vim71/src/option.c 2007-1 0-29 08:09:48.000000000 -07005757 --- vim71.orig/src/option.c 2007-05-01 07:26:10.000000000 -0400 5758 +++ vim71/src/option.c 2007-12-20 23:59:12.000000000 -0500 5045 5759 @@ -427,6 +427,8 @@ 5046 5760 #define P_NOGLOB 0x100000L/* do not use local value for global vimrc */ … … 5231 5945 return (STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0); 5232 5946 diff -Naur vim71.orig/src/os_unix.c vim71/src/os_unix.c 5233 --- vim71.orig/src/os_unix.c 2007-05-09 12:41:58.000000000 -0700 5234 +++ vim71/src/os_unix.c 2007-10-29 08:09:32.000000000 -0700 5947 --- vim71.orig/src/os_unix.c 2007-05-09 15:41:58.000000000 -0400 5948 +++ vim71/src/os_unix.c 2007-12-20 23:59:55.000000000 -0500 5949 @@ -310,7 +310,7 @@ 5950 } 5951 5952 /* 5953 - * mch_inchar(): low level input funcion. 5954 + * mch_inchar(): low level input function. 5955 * Get a characters from the keyboard. 5956 * Return the number of characters that are available. 5957 * If wtime == 0 do not wait for characters. 5235 5958 @@ -753,7 +753,8 @@ 5236 5959 if (signal_stack != NULL) … … 5243 5966 * "struct sigaltstack" needs to be declared. */ 5244 5967 extern int sigaltstack __ARGS((const struct sigaltstack *ss, struct sigaltstack *oss)); 5245 @@ -2499,7 +2500,13 @@ 5968 @@ -1566,18 +1567,19 @@ 5969 #ifdef FEAT_XCLIPBOARD 5970 if (xterm_dpy != NULL && x11_window != 0) 5971 { 5972 - /* Checked it already. */ 5973 - if (x11_display_from == XD_XTERM) 5974 - return OK; 5975 - 5976 - /* 5977 - * If the X11 display was opened here before, for the window where Vim 5978 - * was started, close that one now to avoid a memory leak. 5979 - */ 5980 - if (x11_display_from == XD_HERE && x11_display != NULL) 5981 - XCloseDisplay(x11_display); 5982 - x11_display = xterm_dpy; 5983 - x11_display_from = XD_XTERM; 5984 + /* We may have checked it already, but Gnome terminal can move us to 5985 + * another window, so we need to check every time. */ 5986 + if (x11_display_from != XD_XTERM) 5987 + { 5988 + /* 5989 + * If the X11 display was opened here before, for the window where 5990 + * Vim was started, close that one now to avoid a memory leak. 5991 + */ 5992 + if (x11_display_from == XD_HERE && x11_display != NULL) 5993 + XCloseDisplay(x11_display); 5994 + x11_display = xterm_dpy; 5995 + x11_display_from = XD_XTERM; 5996 + } 5997 if (test_x11_window(x11_display) == FAIL) 5998 { 5999 /* probably bad $WINDOWID */ 6000 @@ -2420,7 +2422,7 @@ 6001 /* 6002 * Set the case of the file name, if it already exists. This will cause the 6003 * file name to remain exactly the same. 6004 - * Only required for file systems where case is ingored and preserved. 6005 + * Only required for file systems where case is ignored and preserved. 6006 */ 6007 /*ARGSUSED*/ 6008 void 6009 @@ -2499,7 +2501,13 @@ 5246 6010 if (stat((char *)name, &statb)) 5247 6011 #endif … … 5257 6021 5258 6022 /* 5259 @@ -5682,7 +5689,7 @@ 6023 @@ -4646,7 +4654,7 @@ 6024 ret = poll(fds, nfd, towait); 6025 # ifdef FEAT_MZSCHEME 6026 if (ret == 0 && mzquantum_used) 6027 - /* MzThreads scheduling is required and timeout occured */ 6028 + /* MzThreads scheduling is required and timeout occurred */ 6029 finished = FALSE; 6030 # endif 6031 6032 @@ -4794,7 +4802,7 @@ 6033 #endif 6034 # ifdef FEAT_MZSCHEME 6035 if (ret == 0 && mzquantum_used) 6036 - /* loop if MzThreads must be scheduled and timeout occured */ 6037 + /* loop if MzThreads must be scheduled and timeout occurred */ 6038 finished = FALSE; 6039 # endif 6040 6041 @@ -5184,7 +5192,7 @@ 6042 { 6043 /* When using system() always add extra quotes, because the shell 6044 * is started twice. Otherwise put a backslash before special 6045 - * characters, except insice ``. */ 6046 + * characters, except inside ``. */ 6047 #ifdef USE_SYSTEM 6048 STRCAT(command, " \""); 6049 STRCAT(command, pat[i]); 6050 @@ -5668,7 +5676,7 @@ 6051 /* gpm library tries to handling TSTP causes 6052 * problems. Anyways, we close connection to Gpm whenever 6053 * we are going to suspend or starting an external process 6054 - * so we should'nt have problem with this 6055 + * so we shouldn't have problem with this 6056 */ 6057 signal(SIGTSTP, restricted ? SIG_IGN : SIG_DFL); 6058 return 1; /* succeed */ 6059 @@ -5682,7 +5690,7 @@ 5260 6060 5261 6061 /* … … 5267 6067 gpm_close() 5268 6068 diff -Naur vim71.orig/src/os_unix.h vim71/src/os_unix.h 5269 --- vim71.orig/src/os_unix.h 2007-05-07 1 2:35:05.000000000 -07005270 +++ vim71/src/os_unix.h 2007-1 0-29 08:09:16.000000000 -07006069 --- vim71.orig/src/os_unix.h 2007-05-07 15:35:05.000000000 -0400 6070 +++ vim71/src/os_unix.h 2007-12-20 23:57:02.000000000 -0500 5271 6071 @@ -508,6 +508,9 @@ 5272 6072 #if !defined(S_ISFIFO) && defined(S_IFIFO) … … 5280 6080 * some systems can't handle both, only use string.h in that case. */ 5281 6081 diff -Naur vim71.orig/src/popupmnu.c vim71/src/popupmnu.c 5282 --- vim71.orig/src/popupmnu.c 2007-03-24 1 3:07:39.000000000 -07005283 +++ vim71/src/popupmnu.c 2007-1 0-29 08:09:18.000000000 -07006082 --- vim71.orig/src/popupmnu.c 2007-03-24 16:07:39.000000000 -0400 6083 +++ vim71/src/popupmnu.c 2007-12-20 23:57:41.000000000 -0500 5284 6084 @@ -75,7 +75,6 @@ 5285 6085 … … 5514 6314 if (res == OK) 5515 6315 diff -Naur vim71.orig/src/proto/charset.pro vim71/src/proto/charset.pro 5516 --- vim71.orig/src/proto/charset.pro 2007-05-12 0 3:39:01.000000000 -07005517 +++ vim71/src/proto/charset.pro 2007-1 0-29 08:09:30.000000000 -07006316 --- vim71.orig/src/proto/charset.pro 2007-05-12 06:39:01.000000000 -0400 6317 +++ vim71/src/proto/charset.pro 2007-12-20 23:58:12.000000000 -0500 5518 6318 @@ -21,6 +21,7 @@ 5519 6319 int vim_iswordp __ARGS((char_u *p)); … … 5524 6324 int vim_isprintc_strict __ARGS((int c)); 5525 6325 int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col)); 6326 diff -Naur vim71.orig/src/proto/ex_docmd.pro vim71/src/proto/ex_docmd.pro 6327 --- vim71.orig/src/proto/ex_docmd.pro 2007-05-12 06:39:10.000000000 -0400 6328 +++ vim71/src/proto/ex_docmd.pro 2007-12-20 23:59:51.000000000 -0500 6329 @@ -5,6 +5,7 @@ 6330 int getline_equal __ARGS((char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int))); 6331 void *getline_cookie __ARGS((char_u *(*fgetline)(int, void *, int), void *cookie)); 6332 int checkforcmd __ARGS((char_u **pp, char *cmd, int len)); 6333 +int modifier_len __ARGS((char_u *cmd)); 6334 int cmd_exists __ARGS((char_u *name)); 6335 char_u *set_one_cmd_context __ARGS((expand_T *xp, char_u *buff)); 6336 char_u *skip_range __ARGS((char_u *cmd, int *ctx)); 5526 6337 diff -Naur vim71.orig/src/proto/fileio.pro vim71/src/proto/fileio.pro 5527 --- vim71.orig/src/proto/fileio.pro 2007-05-12 0 3:39:14.000000000 -07005528 +++ vim71/src/proto/fileio.pro 2007-1 0-29 08:09:40.000000000 -07006338 --- vim71.orig/src/proto/fileio.pro 2007-05-12 06:39:14.000000000 -0400 6339 +++ vim71/src/proto/fileio.pro 2007-12-20 23:59:05.000000000 -0500 5529 6340 @@ -2,6 +2,7 @@ 5530 6341 void filemess __ARGS((buf_T *buf, char_u *name, char_u *s, int attr)); … … 5545 6356 char_u *set_context_in_autocmd __ARGS((expand_T *xp, char_u *arg, int doautocmd)); 5546 6357 diff -Naur vim71.orig/src/proto/getchar.pro vim71/src/proto/getchar.pro 5547 --- vim71.orig/src/proto/getchar.pro 2007-05-12 0 3:39:16.000000000 -07005548 +++ vim71/src/proto/getchar.pro 2007-1 0-29 08:09:37.000000000 -07006358 --- vim71.orig/src/proto/getchar.pro 2007-05-12 06:39:16.000000000 -0400 6359 +++ vim71/src/proto/getchar.pro 2007-12-20 23:58:39.000000000 -0500 5549 6360 @@ -38,6 +38,7 @@ 5550 6361 void updatescript __ARGS((int c)); … … 5556 6367 int vpeekc_any __ARGS((void)); 5557 6368 diff -Naur vim71.orig/src/proto/if_cscope.pro vim71/src/proto/if_cscope.pro 5558 --- vim71.orig/src/proto/if_cscope.pro 2007-05-12 0 3:39:21.000000000 -07005559 +++ vim71/src/proto/if_cscope.pro 2007-1 0-29 08:09:37.000000000 -07006369 --- vim71.orig/src/proto/if_cscope.pro 2007-05-12 06:39:21.000000000 -0400 6370 +++ vim71/src/proto/if_cscope.pro 2007-12-20 23:58:34.000000000 -0500 5560 6371 @@ -6,4 +6,5 @@ 5561 6372 void cs_free_tags __ARGS((void)); … … 5565 6376 /* vim: set ft=c : */ 5566 6377 diff -Naur vim71.orig/src/proto/mbyte.pro vim71/src/proto/mbyte.pro 5567 --- vim71.orig/src/proto/mbyte.pro 2007-05-12 0 3:39:38.000000000 -07005568 +++ vim71/src/proto/mbyte.pro 2007-1 0-29 08:09:37.000000000 -07006378 --- vim71.orig/src/proto/mbyte.pro 2007-05-12 06:39:38.000000000 -0400 6379 +++ vim71/src/proto/mbyte.pro 2007-12-20 23:58:25.000000000 -0500 5569 6380 @@ -12,9 +12,9 @@ 5570 6381 int utf_ptr2cells __ARGS((char_u *p)); … … 5581 6392 int mb_ptr2char_adv __ARGS((char_u **pp)); 5582 6393 diff -Naur vim71.orig/src/proto/misc1.pro vim71/src/proto/misc1.pro 5583 --- vim71.orig/src/proto/misc1.pro 2007-05-12 0 3:39:34.000000000 -07005584 +++ vim71/src/proto/misc1.pro 2007-1 0-29 08:09:38.000000000 -07006394 --- vim71.orig/src/proto/misc1.pro 2007-05-12 06:39:34.000000000 -0400 6395 +++ vim71/src/proto/misc1.pro 2007-12-20 23:59:02.000000000 -0500 5585 6396 @@ -48,10 +48,11 @@ 5586 6397 void vim_beep __ARGS((void)); … … 5598 6409 void home_replace __ARGS((buf_T *buf, char_u *src, char_u *dst, int dstlen, int one)); 5599 6410 diff -Naur vim71.orig/src/proto/search.pro vim71/src/proto/search.pro 5600 --- vim71.orig/src/proto/search.pro 2007-05-12 0 3:39:50.000000000 -07005601 +++ vim71/src/proto/search.pro 2007-1 0-29 08:09:18.000000000 -07006411 --- vim71.orig/src/proto/search.pro 2007-05-12 06:39:50.000000000 -0400 6412 +++ vim71/src/proto/search.pro 2007-12-20 23:57:41.000000000 -0500 5602 6413 @@ -1,6 +1,7 @@ 5603 6414 /* search.c */ … … 5609 6420 void free_search_patterns __ARGS((void)); 5610 6421 diff -Naur vim71.orig/src/proto/syntax.pro vim71/src/proto/syntax.pro 5611 --- vim71.orig/src/proto/syntax.pro 2007-05-12 0 3:39:52.000000000 -07005612 +++ vim71/src/proto/syntax.pro 2007-1 0-29 08:09:16.000000000 -07006422 --- vim71.orig/src/proto/syntax.pro 2007-05-12 06:39:52.000000000 -0400 6423 +++ vim71/src/proto/syntax.pro 2007-12-20 23:57:14.000000000 -0500 5613 6424 @@ -8,6 +8,8 @@ 5614 6425 void syntax_clear __ARGS((buf_T *buf)); … … 5621 6432 int syn_get_id __ARGS((win_T *wp, long lnum, colnr_T col, int trans, int *spellp)); 5622 6433 diff -Naur vim71.orig/src/proto/window.pro vim71/src/proto/window.pro 5623 --- vim71.orig/src/proto/window.pro 2007-05-12 0 3:40:00.000000000 -07005624 +++ vim71/src/proto/window.pro 2007-1 0-29 08:09:16.000000000 -07006434 --- vim71.orig/src/proto/window.pro 2007-05-12 06:40:00.000000000 -0400 6435 +++ vim71/src/proto/window.pro 2007-12-20 23:57:20.000000000 -0500 5625 6436 @@ -59,4 +59,8 @@ 5626 6437 int only_one_window __ARGS((void)); … … 5633 6444 /* vim: set ft=c : */ 5634 6445 diff -Naur vim71.orig/src/quickfix.c vim71/src/quickfix.c 5635 --- vim71.orig/src/quickfix.c 2007-02-03 1 6:50:17.000000000 -08005636 +++ vim71/src/quickfix.c 2007-1 0-29 08:09:38.000000000 -07006446 --- vim71.orig/src/quickfix.c 2007-02-03 19:50:17.000000000 -0500 6447 +++ vim71/src/quickfix.c 2007-12-20 23:58:47.000000000 -0500 5637 6448 @@ -1612,8 +1612,8 @@ 5638 6449 } … … 5702 6513 } 5703 6514 diff -Naur vim71.orig/src/regexp.c vim71/src/regexp.c 5704 --- vim71.orig/src/regexp.c 2007-05-07 1 2:50:03.000000000 -07005705 +++ vim71/src/regexp.c 2007-1 0-29 08:09:18.000000000 -07006515 --- vim71.orig/src/regexp.c 2007-05-07 15:50:03.000000000 -0400 6516 +++ vim71/src/regexp.c 2007-12-21 00:00:04.000000000 -0500 5706 6517 @@ -2220,7 +2220,7 @@ 5707 6518 break; … … 5722 6533 break; 5723 6534 case CLASS_XDIGIT: 5724 @@ -3465,7 +3465,7 @@ 6535 @@ -2770,7 +2770,8 @@ 6536 { 6537 #ifdef FEAT_MBYTE 6538 if (enc_utf8) 6539 - prevchr_len += utf_char2len(mb_ptr2char(regparse + prevchr_len)); 6540 + /* exclude composing chars that mb_ptr2len does include */ 6541 + prevchr_len += utf_ptr2len(regparse + prevchr_len); 6542 else if (has_mbyte) 6543 prevchr_len += (*mb_ptr2len)(regparse + prevchr_len); 6544 else 6545 @@ -3465,7 +3466,7 @@ 5725 6546 (enc_utf8 && utf_fold(prog->regstart) == utf_fold(c))) 5726 6547 || (c < 255 && prog->regstart < 255 && … … 5731 6552 else 5732 6553 retval = 0; 5733 @@ -4200,7 +4200,7 @@ 6554 @@ -3809,11 +3810,11 @@ 6555 break; 6556 6557 case RE_BOF: 6558 - /* Passing -1 to the getline() function provided for the search 6559 - * should always return NULL if the current line is the first 6560 - * line of the file. */ 6561 + /* We're not at the beginning of the file when below the first 6562 + * line where we started, not at the start of the line or we 6563 + * didn't start at the first line of the buffer. */ 6564 if (reglnum != 0 || reginput != regline 6565 - || (REG_MULTI && reg_getline((linenr_T)-1) != NULL)) 6566 + || (REG_MULTI && reg_firstlnum > 1)) 6567 status = RA_NOMATCH; 6568 break; 6569 6570 @@ -4200,7 +4201,7 @@ 5734 6571 #ifdef FEAT_MBYTE 5735 6572 !enc_utf8 && … … 5740 6577 else if (*opnd == NUL) 5741 6578 { 5742 @@ -4733,10 +473 3,10 @@6579 @@ -4733,10 +4734,10 @@ 5743 6580 rst.nextb = *OPERAND(next); 5744 6581 if (ireg_ic) … … 5754 6591 else 5755 6592 rst.nextb_ic = rst.nextb; 5756 @@ -5558,11 +555 8,12 @@6593 @@ -5558,11 +5559,12 @@ 5757 6594 int cu, cl; 5758 6595 … … 5770 6607 { 5771 6608 count++; 5772 @@ -6490,10 +649 1,10 @@6609 @@ -6490,10 +6492,10 @@ 5773 6610 cc = utf_fold(c); 5774 6611 else … … 5785 6622 return vim_strchr(s, c); 5786 6623 5787 @@ -6637,9 +663 8,9 @@6624 @@ -6637,9 +6639,9 @@ 5788 6625 } 5789 6626 } … … 5797 6634 } 5798 6635 else 5799 @@ -7014,7 +701 5,14 @@6636 @@ -7014,7 +7016,14 @@ 5800 6637 #ifdef FEAT_MBYTE 5801 6638 if (has_mbyte) … … 5814 6651 len -= l; 5815 6652 diff -Naur vim71.orig/src/screen.c vim71/src/screen.c 5816 --- vim71.orig/src/screen.c 2007-05-07 1 2:27:53.000000000 -07005817 +++ vim71/src/screen.c 2007-1 0-29 08:09:38.000000000 -07006653 --- vim71.orig/src/screen.c 2007-05-07 15:27:53.000000000 -0400 6654 +++ vim71/src/screen.c 2007-12-20 23:59:41.000000000 -0500 5818 6655 @@ -100,27 +100,7 @@ 5819 6656 static int screen_cur_row, screen_cur_col; /* last known cursor position */ … … 5995 6832 int extra_attr = 0; /* attributes when n_extra != 0 */ 5996 6833 static char_u *at_end_str = (char_u *)""; /* used for p_extra when 5997 @@ -2626,10 +2641,13 @@ 6834 @@ -2584,6 +2599,7 @@ 6835 int syntax_attr = 0; /* attributes desired by syntax */ 6836 int has_syntax = FALSE; /* this buffer has syntax highl. */ 6837 int save_did_emsg; 6838 + int eol_hl_off = 0; /* 1 if highlighted char after EOL */ 6839 #endif 6840 #ifdef FEAT_SPELL 6841 int has_spell = FALSE; /* this buffer has spell checking */ 6842 @@ -2626,10 +2642,13 @@ 5998 6843 int line_attr = 0; /* atrribute for the whole line */ 5999 6844 #endif … … 6013 6858 #ifdef FEAT_ARABIC 6014 6859 int prev_c = 0; /* previous Arabic character */ 6015 @@ -3074,12 +309 2,20 @@6860 @@ -3074,12 +3093,20 @@ 6016 6861 6017 6862 #ifdef FEAT_SEARCH_EXTRA … … 6038 6883 shl->endcol = MAXCOL; 6039 6884 shl->attr_cur = 0; 6040 @@ -3122,6 +314 8,8 @@6885 @@ -3122,6 +3149,8 @@ 6041 6886 area_highlighting = TRUE; 6042 6887 } … … 6047 6892 #endif 6048 6893 6049 @@ -3163,10 +319 1,8 @@6894 @@ -3163,10 +3192,8 @@ 6050 6895 if (cmdwin_type != 0 && wp == curwin) 6051 6896 { … … 6059 6904 } 6060 6905 } 6061 @@ -3182,6 +320 8,7 @@6906 @@ -3182,6 +3209,7 @@ 6062 6907 fill_foldcolumn(extra, wp, FALSE, lnum); 6063 6908 n_extra = wp->w_p_fdc; … … 6067 6912 char_attr = hl_attr(HLF_FC); 6068 6913 } 6069 @@ -3388,13 +341 5,24 @@6914 @@ -3388,13 +3416,24 @@ 6070 6915 * After end, check for start/end of next match. 6071 6916 * When another match, have to check for start again. … … 6097 6942 { 6098 6943 if (shl->startcol != MAXCOL 6099 @@ -3442,26 +348 0,43 @@6944 @@ -3442,26 +3481,43 @@ 6100 6945 } 6101 6946 break; … … 6150 6995 line_attr = hl_attr(diff_hlf); 6151 6996 } 6152 @@ -3496,9 +355 1,11 @@6997 @@ -3496,9 +3552,11 @@ 6153 6998 * Get the next character to put on the screen. 6154 6999 */ … … 6165 7010 */ 6166 7011 if (n_extra > 0) 6167 @@ -3611,6 +366 8,8 @@7012 @@ -3611,6 +3669,8 @@ 6168 7013 * Draw it as a space with a composing char. */ 6169 7014 if (utf_iscomposing(mb_c)) … … 6174 7019 u8cc[i] = u8cc[i - 1]; 6175 7020 u8cc[0] = mb_c; 6176 @@ -3621,13 +368 0,18 @@7021 @@ -3621,13 +3681,18 @@ 6177 7022 if ((mb_l == 1 && c >= 0x80) 6178 7023 || (mb_l >= 1 && mb_c == 0) … … 6194 7039 transchar_hex(extra, mb_c); 6195 7040 # ifdef FEAT_RIGHTLEFT 6196 @@ -3635,11 +3 699,13 @@7041 @@ -3635,11 +3700,13 @@ 6197 7042 rl_mirror(extra); 6198 7043 # endif … … 6208 7053 p_extra = extra; 6209 7054 c = *p_extra; 6210 @@ -3752,10 +381 8,8 @@7055 @@ -3752,10 +3819,8 @@ 6211 7056 * a '<' in the first column. */ 6212 7057 if (n_skip > 0 && mb_l > 1) … … 6220 7065 if (area_attr == 0 && search_attr == 0) 6221 7066 { 6222 @@ -4254,14 +4318,29 @@ 7067 @@ -4248,20 +4313,39 @@ 7068 { 7069 #ifdef FEAT_SEARCH_EXTRA 7070 long prevcol = (long)(ptr - line) - (c == NUL); 7071 + 7072 + /* we're not really at that column when skipping some text */ 7073 + if ((long)(wp->w_p_wrap ? wp->w_skipcol : wp->w_leftcol) > prevcol) 7074 + ++prevcol; 7075 #endif 7076 7077 /* invert at least one char, used for Visual and empty line or 6223 7078 * highlight match at end of line. If it's beyond the last 6224 7079 * char on the screen, just overwrite that one (tricky!) Not … … 6254 7109 && did_line_attr <= 1 6255 7110 # endif 6256 @@ -4302, 15 +4381,27 @@7111 @@ -4302,26 +4386,47 @@ 6257 7112 #ifdef FEAT_SEARCH_EXTRA 6258 7113 if (area_attr == 0) … … 6289 7144 } 6290 7145 #endif 6291 @@ -4460,6 +4551,8 @@ 7146 ScreenAttrs[off] = char_attr; 7147 #ifdef FEAT_RIGHTLEFT 7148 if (wp->w_p_rl) 7149 + { 7150 --col; 7151 + --off; 7152 + } 7153 else 7154 #endif 7155 + { 7156 ++col; 7157 + ++off; 7158 + } 7159 ++vcol; 7160 +#ifdef FEAT_SYN_HL 7161 + eol_hl_off = 1; 7162 +#endif 7163 } 7164 } 7165 7166 @@ -4331,6 +4436,14 @@ 7167 if (c == NUL) 7168 { 7169 #ifdef FEAT_SYN_HL 7170 + if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol) 7171 + { 7172 + /* highlight last char after line */ 7173 + --col; 7174 + --off; 7175 + --vcol; 7176 + } 7177 + 7178 /* Highlight 'cursorcolumn' past end of the line. */ 7179 if (wp->w_p_wrap) 7180 v = wp->w_skipcol; 7181 @@ -4341,7 +4454,7 @@ 7182 7183 vcol = v + col - win_col_off(wp); 7184 if (wp->w_p_cuc 7185 - && (int)wp->w_virtcol >= vcol 7186 + && (int)wp->w_virtcol >= vcol - eol_hl_off 7187 && (int)wp->w_virtcol < W_WIDTH(wp) * (row - startrow + 1) 7188 + v 7189 && lnum != wp->w_cursor.lnum 7190 @@ -4460,6 +4573,8 @@ 6292 7191 { 6293 7192 if (mb_utf8) … … 6298 7197 if ((c & 0xff) == 0) 6299 7198 ScreenLines[off] = 0x80; /* avoid storing zero */ 6300 @@ -4548,7 +46 41,7 @@7199 @@ -4548,7 +4663,7 @@ 6301 7200 6302 7201 /* … … 6307 7206 if (( 6308 7207 #ifdef FEAT_RIGHTLEFT 6309 @@ -4625,9 +47 18,13 @@7208 @@ -4625,9 +4740,13 @@ 6310 7209 #endif 6311 7210 #ifdef FEAT_MBYTE … … 6323 7222 ) 6324 7223 { 6325 @@ -4787,6 +4 884,10 @@7224 @@ -4787,6 +4906,10 @@ 6326 7225 { 6327 7226 unsigned off_from; … … 6334 7233 #if defined(FEAT_GUI) || defined(UNIX) || defined(FEAT_VERTSPLIT) 6335 7234 int hl; 6336 @@ -4813,6 +49 14,10 @@7235 @@ -4813,6 +4936,10 @@ 6337 7236 6338 7237 off_from = (unsigned)(current_ScreenLine - ScreenLines); … … 6345 7244 #ifdef FEAT_RIGHTLEFT 6346 7245 if (rlflag) 6347 @@ -4847,7 +49 52,7 @@7246 @@ -4847,7 +4974,7 @@ 6348 7247 { 6349 7248 #ifdef FEAT_MBYTE … … 6354 7253 char_cells = 1; 6355 7254 #endif 6356 @@ -4924,7 +50 29,7 @@7255 @@ -4924,7 +5051,7 @@ 6357 7256 * ScreenLinesUC[] is sufficient. */ 6358 7257 if (char_cells == 1 … … 6363 7262 /* Writing a single-cell character over a double-cell 6364 7263 * character: need to redraw the next cell. */ 6365 @@ -4933,8 +50 38,8 @@7264 @@ -4933,8 +5060,8 @@ 6366 7265 } 6367 7266 else if (char_cells == 2 … … 6374 7273 /* Writing the second half of a double-cell character over 6375 7274 * a double-cell character: need to redraw the second 6376 @@ -4953,10 +50 58,10 @@7275 @@ -4953,10 +5080,10 @@ 6377 7276 * char over the left halve of an existing one. */ 6378 7277 if (has_mbyte && col + char_cells == endcol … … 6388 7287 #endif 6389 7288 6390 @@ -5096,10 +52 01,11 @@7289 @@ -5096,10 +5223,11 @@ 6391 7290 /* find previous character by counting from first 6392 7291 * column and get its width. */ … … 6401 7300 } 6402 7301 } 6403 @@ -5285,7 +5 391,7 @@7302 @@ -5285,7 +5413,7 @@ 6404 7303 static int skip_status_match_char __ARGS((expand_T *xp, char_u *s)); 6405 7304 … … 6410 7309 static int 6411 7310 status_match_len(xp, s) 6412 @@ -5351,7 +54 57,7 @@7311 @@ -5351,7 +5479,7 @@ 6413 7312 int row; 6414 7313 char_u *buf; … … 6419 7318 int attr; 6420 7319 int i; 6421 @@ -6103,6 +62 09,7 @@7320 @@ -6103,6 +6231,7 @@ 6422 7321 char_u *ptr = text; 6423 7322 int c; … … 6427 7326 int mbyte_cells = 1; 6428 7327 int u8c = 0; 6429 @@ -6119,8 +62 26,12 @@7328 @@ -6119,8 +6248,12 @@ 6430 7329 return; 6431 7330 … … 6442 7341 c = *ptr; 6443 7342 #ifdef FEAT_MBYTE 6444 @@ -6143,6 +62 54,7 @@7343 @@ -6143,6 +6276,7 @@ 6445 7344 else 6446 7345 u8c = utfc_ptr2char(ptr, u8cc); … … 6450 7349 if (u8c >= 0x10000) 6451 7350 { 6452 @@ -6150,6 +62 62,7 @@7351 @@ -6150,6 +6284,7 @@ 6453 7352 if (attr == 0) 6454 7353 attr = hl_attr(HLF_8); … … 6458 7357 if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c)) 6459 7358 { 6460 @@ -6241,19 +63 54,19 @@7359 @@ -6241,19 +6376,19 @@ 6461 7360 else if (has_mbyte 6462 7361 && (len < 0 ? ptr[mbyte_blen] == NUL … … 6484 7383 #endif 6485 7384 ScreenLines[off] = c; 6486 @@ -6318,7 +64 31,7 @@7385 @@ -6318,7 +6453,7 @@ 6487 7386 6488 7387 #ifdef FEAT_SEARCH_EXTRA … … 6493 7392 static void 6494 7393 start_search_hl() 6495 @@ -6331,7 +64 44,7 @@7394 @@ -6331,7 +6466,7 @@ 6496 7395 } 6497 7396 … … 6502 7401 static void 6503 7402 end_search_hl() 6504 @@ -6351,18 +64 64,28 @@7403 @@ -6351,18 +6486,28 @@ 6505 7404 win_T *wp; 6506 7405 linenr_T lnum; … … 6536 7435 && shl->lnum == 0 6537 7436 && re_multiline(shl->rm.regprog)) 6538 @@ -6397,11 +65 20,13 @@7437 @@ -6397,11 +6542,13 @@ 6539 7438 } 6540 7439 } … … 6551 7450 * Sets shl->lnum and shl->rm contents. 6552 7451 * Note: Assumes a previous match is always before "lnum", unless 6553 @@ -6411,7 +65 36,7 @@7452 @@ -6411,7 +6558,7 @@ 6554 7453 static void 6555 7454 next_search_hl(win, shl, lnum, mincol) … … 6560 7459 colnr_T mincol; /* minimal column for a match */ 6561 7460 { 6562 @@ -6479,7 +66 04,7 @@7461 @@ -6479,7 +6626,7 @@ 6563 7462 /* Error while handling regexp: stop using this regexp. */ 6564 7463 if (shl == &search_hl) … … 6569 7468 no_hlsearch = TRUE; 6570 7469 } 6571 @@ -6827,6 +69 52,9 @@7470 @@ -6827,6 +6974,9 @@ 6572 7471 { 6573 7472 int r, c; … … 6579 7478 /* Can't use ScreenLines unless initialized */ 6580 7479 if (ScreenLines == NULL) 6581 @@ -6837,10 +69 65,13 @@7480 @@ -6837,10 +6987,13 @@ 6582 7481 for (r = row; r < row + height; ++r) 6583 7482 { … … 6594 7493 screen_char_2(off + c, r, c); 6595 7494 ++c; 6596 @@ -6850,7 + 6981,7 @@7495 @@ -6850,7 +7003,7 @@ 6597 7496 { 6598 7497 screen_char(off + c, r, c); … … 6604 7503 } 6605 7504 diff -Naur vim71.orig/src/search.c vim71/src/search.c 6606 --- vim71.orig/src/search.c 2007-05-07 1 2:42:02.000000000 -07006607 +++ vim71/src/search.c 2007-1 0-29 08:09:18.000000000 -07007505 --- vim71.orig/src/search.c 2007-05-07 15:42:02.000000000 -0400 7506 +++ vim71/src/search.c 2007-12-20 23:57:41.000000000 -0500 6608 7507 @@ -101,7 +101,6 @@ 6609 7508 static char_u *mr_pattern = NULL; /* pattern used by search_regcomp() */ … … 6741 7640 6742 7641 diff -Naur vim71.orig/src/spell.c vim71/src/spell.c 6743 --- vim71.orig/src/spell.c 2007-05-07 1 2:48:38.000000000 -07006744 +++ vim71/src/spell.c 2007-1 0-29 08:09:18.000000000 -07007642 --- vim71.orig/src/spell.c 2007-05-07 15:48:38.000000000 -0400 7643 +++ vim71/src/spell.c 2007-12-20 23:57:33.000000000 -0500 6745 7644 @@ -7829,7 +7829,7 @@ 6746 7645 # if (_MSC_VER <= 1200) … … 6796 7695 if (c == c2) 6797 7696 diff -Naur vim71.orig/src/structs.h vim71/src/structs.h 6798 --- vim71.orig/src/structs.h 2007-05-07 1 2:50:49.000000000 -07006799 +++ vim71/src/structs.h 2007-1 0-29 08:09:48.000000000 -07007697 --- vim71.orig/src/structs.h 2007-05-07 15:50:49.000000000 -0400 7698 +++ vim71/src/structs.h 2007-12-20 23:59:11.000000000 -0500 6800 7699 @@ -278,6 +278,9 @@ 6801 7700 linenr_T ue_lcount; /* linecount when u_save called */ … … 6881 7780 /* 6882 7781 diff -Naur vim71.orig/src/syntax.c vim71/src/syntax.c 6883 --- vim71.orig/src/syntax.c 2007-05-07 1 2:42:55.000000000 -07006884 +++ vim71/src/syntax.c 2007-1 0-29 08:09:51.000000000 -07007782 --- vim71.orig/src/syntax.c 2007-05-07 15:42:55.000000000 -0400 7783 +++ vim71/src/syntax.c 2007-12-20 23:59:18.000000000 -0500 6885 7784 @@ -66,8 +66,10 @@ 6886 7785 #define HL_TABLE() ((struct hl_group *)((highlight_ga.ga_data))) … … 7135 8034 * Used when quitting for systems which need it. 7136 8035 diff -Naur vim71.orig/src/term.c vim71/src/term.c 7137 --- vim71.orig/src/term.c 2007-05-07 1 2:39:11.000000000 -07007138 +++ vim71/src/term.c 2007-1 0-29 08:09:37.000000000 -07008036 --- vim71.orig/src/term.c 2007-05-07 15:39:11.000000000 -0400 8037 +++ vim71/src/term.c 2007-12-20 23:58:45.000000000 -0500 7139 8038 @@ -4809,6 +4809,8 @@ 7140 8039 if (num_bytes == -1) … … 7147 8046 else if (key_name[0] == (int)KS_TABMENU) 7148 8047 diff -Naur vim71.orig/src/termlib.c vim71/src/termlib.c 7149 --- vim71.orig/src/termlib.c 2007-05-07 1 2:39:49.000000000 -07007150 +++ vim71/src/termlib.c 2007-1 0-29 08:09:18.000000000 -07008048 --- vim71.orig/src/termlib.c 2007-05-07 15:39:49.000000000 -0400 8049 +++ vim71/src/termlib.c 2007-12-20 23:57:38.000000000 -0500 7151 8050 @@ -191,7 +191,7 @@ 7152 8051 lbuf[0] == '\t' && … … 7159 8058 if (lbuf[llen-2] == '\\') /* and continuations */ 7160 8059 diff -Naur vim71.orig/src/testdir/Makefile vim71/src/testdir/Makefile 7161 --- vim71.orig/src/testdir/Makefile 2006-04-30 0 4:08:01.000000000 -07007162 +++ vim71/src/testdir/Makefile 2007-1 0-29 08:09:38.000000000 -07008060 --- vim71.orig/src/testdir/Makefile 2006-04-30 07:08:01.000000000 -0400 8061 +++ vim71/src/testdir/Makefile 2007-12-20 23:58:59.000000000 -0500 7163 8062 @@ -1,9 +1,13 @@ 7164 8063 # … … 7220 8119 -echo Test results: >test.log 7221 8120 diff -Naur vim71.orig/src/testdir/test14.in vim71/src/testdir/test14.in 7222 --- vim71.orig/src/testdir/test14.in 2004-06-07 07:32:05.000000000 -07007223 +++ vim71/src/testdir/test14.in 2007-1 0-29 08:09:38.000000000 -07008121 --- vim71.orig/src/testdir/test14.in 2004-06-07 10:32:05.000000000 -0400 8122 +++ vim71/src/testdir/test14.in 2007-12-20 23:58:59.000000000 -0500 7224 8123 @@ -18,6 +18,7 @@ 7225 8124 : let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>" … … 7231 8130 /^Piece 7232 8131 diff -Naur vim71.orig/src/testdir/test26.in vim71/src/testdir/test26.in 7233 --- vim71.orig/src/testdir/test26.in 2004-06-07 07:32:05.000000000 -07007234 +++ vim71/src/testdir/test26.in 2007-1 0-29 08:09:38.000000000 -07008132 --- vim71.orig/src/testdir/test26.in 2004-06-07 10:32:05.000000000 -0400 8133 +++ vim71/src/testdir/test26.in 2007-12-20 23:58:59.000000000 -0500 7235 8134 @@ -37,6 +37,7 @@ 7236 8135 : endif … … 7242 8141 ENDTEST 7243 8142 diff -Naur vim71.orig/src/testdir/test34.in vim71/src/testdir/test34.in 7244 --- vim71.orig/src/testdir/test34.in 2006-04-30 0 6:33:24.000000000 -07007245 +++ vim71/src/testdir/test34.in 2007-1 0-29 08:09:38.000000000 -07008143 --- vim71.orig/src/testdir/test34.in 2006-04-30 09:33:24.000000000 -0400 8144 +++ vim71/src/testdir/test34.in 2007-12-20 23:58:59.000000000 -0500 7246 8145 @@ -52,7 +52,15 @@ 7247 8146 ---*--- … … 7262 8161 here 7263 8162 diff -Naur vim71.orig/src/testdir/test45.in vim71/src/testdir/test45.in 7264 --- vim71.orig/src/testdir/test45.in 2004-06-07 07:32:05.000000000 -07007265 +++ vim71/src/testdir/test45.in 2007-1 0-29 08:09:38.000000000 -07008163 --- vim71.orig/src/testdir/test45.in 2004-06-07 10:32:05.000000000 -0400 8164 +++ vim71/src/testdir/test45.in 2007-12-20 23:58:59.000000000 -0500 7266 8165 @@ -55,6 +55,7 @@ 7267 8166 /kk$ … … 7273 8172 7274 8173 diff -Naur vim71.orig/src/testdir/test47.in vim71/src/testdir/test47.in 7275 --- vim71.orig/src/testdir/test47.in 2004-06-07 07:32:05.000000000 -07007276 +++ vim71/src/testdir/test47.in 2007-1 0-29 08:09:38.000000000 -07008174 --- vim71.orig/src/testdir/test47.in 2004-06-07 10:32:05.000000000 -0400 8175 +++ vim71/src/testdir/test47.in 2007-12-20 23:58:59.000000000 -0500 7277 8176 @@ -34,6 +34,7 @@ 7278 8177 :call append("$", two) … … 7284 8183 7285 8184 diff -Naur vim71.orig/src/testdir/test49.in vim71/src/testdir/test49.in 7286 --- vim71.orig/src/testdir/test49.in 2006-04-28 0 2:29:54.000000000 -07007287 +++ vim71/src/testdir/test49.in 2007-1 0-29 08:09:38.000000000 -07008185 --- vim71.orig/src/testdir/test49.in 2006-04-28 05:29:54.000000000 -0400 8186 +++ vim71/src/testdir/test49.in 2007-12-20 23:58:59.000000000 -0500 7288 8187 @@ -1,13 +1,29 @@ 7289 8188 This is a test of the script language. … … 7319 8218 Results of test49.vim: 7320 8219 diff -Naur vim71.orig/src/testdir/test55.in vim71/src/testdir/test55.in 7321 --- vim71.orig/src/testdir/test55.in 2006-10-15 07:07:05.000000000 -07007322 +++ vim71/src/testdir/test55.in 2007-1 0-29 08:09:38.000000000 -07008220 --- vim71.orig/src/testdir/test55.in 2006-10-15 10:07:05.000000000 -0400 8221 +++ vim71/src/testdir/test55.in 2007-12-20 23:58:59.000000000 -0500 7323 8222 @@ -345,6 +345,10 @@ 7324 8223 :endfun … … 7333 8232 7334 8233 diff -Naur vim71.orig/src/testdir/test56.in vim71/src/testdir/test56.in 7335 --- vim71.orig/src/testdir/test56.in 2006-09-03 07:28:41.000000000 -07007336 +++ vim71/src/testdir/test56.in 2007-1 0-29 08:09:38.000000000 -07008234 --- vim71.orig/src/testdir/test56.in 2006-09-03 10:28:41.000000000 -0400 8235 +++ vim71/src/testdir/test56.in 2007-12-20 23:58:59.000000000 -0500 7337 8236 @@ -17,5 +17,5 @@ 7338 8237 fun s:DoNothing() … … 7343 8242 end: 7344 8243 diff -Naur vim71.orig/src/testdir/test58.in vim71/src/testdir/test58.in 7345 --- vim71.orig/src/testdir/test58.in 2006-04-03 1 1:24:04.000000000 -07007346 +++ vim71/src/testdir/test58.in 2007-1 0-29 08:09:38.000000000 -07008244 --- vim71.orig/src/testdir/test58.in 2006-04-03 14:24:04.000000000 -0400 8245 +++ vim71/src/testdir/test58.in 2007-12-20 23:58:59.000000000 -0500 7347 8246 @@ -86,6 +86,7 @@ 7348 8247 :$put =str … … 7365 8264 7366 8265 diff -Naur vim71.orig/src/testdir/test59.in vim71/src/testdir/test59.in 7367 --- vim71.orig/src/testdir/test59.in 2006-04-03 1 1:29:24.000000000 -07007368 +++ vim71/src/testdir/test59.in 2007-1 0-29 08:09:38.000000000 -07008266 --- vim71.orig/src/testdir/test59.in 2006-04-03 14:29:24.000000000 -0400 8267 +++ vim71/src/testdir/test59.in 2007-12-20 23:58:59.000000000 -0500 7369 8268 @@ -90,6 +90,7 @@ 7370 8269 :$put =str … … 7387 8286 7388 8287 diff -Naur vim71.orig/src/testdir/test60.in vim71/src/testdir/test60.in 7389 --- vim71.orig/src/testdir/test60.in 2006-05-05 1 1:41:18.000000000 -07007390 +++ vim71/src/testdir/test60.in 2007-1 0-29 08:09:38.000000000 -07008288 --- vim71.orig/src/testdir/test60.in 2006-05-05 14:41:18.000000000 -0400 8289 +++ vim71/src/testdir/test60.in 2007-12-20 23:58:59.000000000 -0500 7391 8290 @@ -569,6 +569,9 @@ 7392 8291 redir END … … 7400 8299 :w 7401 8300 diff -Naur vim71.orig/src/testdir/test60.vim vim71/src/testdir/test60.vim 7402 --- vim71.orig/src/testdir/test60.vim 2006-01-12 1 1:45:59.000000000 -08007403 +++ vim71/src/testdir/test60.vim 2007-1 0-29 08:09:38.000000000 -07008301 --- vim71.orig/src/testdir/test60.vim 2006-01-12 14:45:59.000000000 -0500 8302 +++ vim71/src/testdir/test60.vim 2007-12-20 23:58:59.000000000 -0500 7404 8303 @@ -94,4 +94,5 @@ 7405 8304 else … … 7409 8308 7410 8309 diff -Naur vim71.orig/src/testdir/test62.in vim71/src/testdir/test62.in 7411 --- vim71.orig/src/testdir/test62.in 2006-04-30 0 4:29:15.000000000 -07007412 +++ vim71/src/testdir/test62.in 2007-1 0-29 08:09:38.000000000 -07008310 --- vim71.orig/src/testdir/test62.in 2006-04-30 07:29:15.000000000 -0400 8311 +++ vim71/src/testdir/test62.in 2007-12-20 23:58:59.000000000 -0500 7413 8312 @@ -7,6 +7,7 @@ 7414 8313 :let nr = tabpagenr() … … 7428 8327 :/^Results/,$w! test.out 7429 8328 diff -Naur vim71.orig/src/testdir/test63.in vim71/src/testdir/test63.in 7430 --- vim71.orig/src/testdir/test63.in 1969-12-31 1 6:00:00.000000000 -08007431 +++ vim71/src/testdir/test63.in 2007-1 0-29 08:09:38.000000000 -07008329 --- vim71.orig/src/testdir/test63.in 1969-12-31 19:00:00.000000000 -0500 8330 +++ vim71/src/testdir/test63.in 2007-12-20 23:58:59.000000000 -0500 7432 8331 @@ -0,0 +1,157 @@ 7433 8332 +Test for ":match", ":2match", ":3match", "clearmatches()", "getmatches()", … … 7589 8488 +Results of test63: 7590 8489 diff -Naur vim71.orig/src/testdir/test63.ok vim71/src/testdir/test63.ok 7591 --- vim71.orig/src/testdir/test63.ok 1969-12-31 1 6:00:00.000000000 -08007592 +++ vim71/src/testdir/test63.ok 2007-1 0-29 08:09:16.000000000 -07008490 --- vim71.orig/src/testdir/test63.ok 1969-12-31 19:00:00.000000000 -0500 8491 +++ vim71/src/testdir/test63.ok 2007-12-20 23:57:20.000000000 -0500 7593 8492 @@ -0,0 +1,11 @@ 7594 8493 +Results of test63: … … 7604 8503 +*** Test 10: OK 7605 8504 diff -Naur vim71.orig/src/testdir/test64.in vim71/src/testdir/test64.in 7606 --- vim71.orig/src/testdir/test64.in 1969-12-31 1 6:00:00.000000000 -08007607 +++ vim71/src/testdir/test64.in 2007-1 0-29 08:09:38.000000000 -07008505 --- vim71.orig/src/testdir/test64.in 1969-12-31 19:00:00.000000000 -0500 8506 +++ vim71/src/testdir/test64.in 2007-12-20 23:58:59.000000000 -0500 7608 8507 @@ -0,0 +1,54 @@ 7609 8508 +Test for regexp patterns. … … 7662 8561 +Results of test64: 7663 8562 diff -Naur vim71.orig/src/testdir/test64.ok vim71/src/testdir/test64.ok 7664 --- vim71.orig/src/testdir/test64.ok 1969-12-31 1 6:00:00.000000000 -08007665 +++ vim71/src/testdir/test64.ok 2007-1 0-29 08:09:25.000000000 -07008563 --- vim71.orig/src/testdir/test64.ok 1969-12-31 19:00:00.000000000 -0500 8564 +++ vim71/src/testdir/test64.ok 2007-12-20 23:57:57.000000000 -0500 7666 8565 @@ -0,0 +1,6 @@ 7667 8566 +Results of test64: … … 7672 8571 +OK 7673 8572 diff -Naur vim71.orig/src/ui.c vim71/src/ui.c 7674 --- vim71.orig/src/ui.c 2007-05-07 1 2:49:09.000000000 -07007675 +++ vim71/src/ui.c 2007-1 0-29 08:09:28.000000000 -07008573 --- vim71.orig/src/ui.c 2007-05-07 15:49:09.000000000 -0400 8574 +++ vim71/src/ui.c 2007-12-20 23:58:05.000000000 -0500 7676 8575 @@ -1603,8 +1603,6 @@ 7677 8576 #if defined(FEAT_GUI) || defined(FEAT_MOUSE_GPM) \ … … 7695 8594 || defined(FEAT_MENU))) \ 7696 8595 diff -Naur vim71.orig/src/undo.c vim71/src/undo.c 7697 --- vim71.orig/src/undo.c 2007-05-07 1 2:21:14.000000000 -07007698 +++ vim71/src/undo.c 2007-1 0-29 08:09:48.000000000 -07008596 --- vim71.orig/src/undo.c 2007-05-07 15:21:14.000000000 -0400 8597 +++ vim71/src/undo.c 2007-12-20 23:59:42.000000000 -0500 7699 8598 @@ -76,6 +76,12 @@ 7700 8599 * buffer is unloaded. … … 7918 8817 u_freeentries(buf, uhp, uhpp); 7919 8818 } 7920 @@ -1585,6 +1707,8 @@ 8819 @@ -1556,6 +1678,14 @@ 8820 { 8821 u_header_T *tofree, *next; 8822 8823 + /* If this is the top branch we may need to use u_freeheader() to update 8824 + * all the pointers. */ 8825 + if (uhp == buf->b_u_oldhead) 8826 + { 8827 + u_freeheader(buf, uhp, uhpp); 8828 + return; 8829 + } 8830 + 8831 if (uhp->uh_alt_prev != NULL) 8832 uhp->uh_alt_prev->uh_alt_next = NULL; 8833 8834 @@ -1585,6 +1715,8 @@ 7921 8835 /* Check for pointers to the header that become invalid now. */ 7922 8836 if (buf->b_u_curhead == uhp) … … 7927 8841 *uhpp = NULL; 7928 8842 7929 @@ -1594,6 +17 18,9 @@8843 @@ -1594,6 +1726,9 @@ 7930 8844 u_freeentry(uep, uep->ue_size); 7931 8845 } … … 7937 8851 --buf->b_u_numhead; 7938 8852 } 7939 @@ -1609,6 +17 36,9 @@8853 @@ -1609,6 +1744,9 @@ 7940 8854 while (n > 0) 7941 8855 U_FREE_LINE(uep->ue_array[--n]); … … 7948 8862 7949 8863 diff -Naur vim71.orig/src/version.c vim71/src/version.c 7950 --- vim71.orig/src/version.c 2007-05-12 0 3:23:44.000000000 -07007951 +++ vim71/src/version.c 2007-1 0-29 08:09:51.000000000 -07007952 @@ -667,6 +667, 266@@8864 --- vim71.orig/src/version.c 2007-05-12 06:23:44.000000000 -0400 8865 +++ vim71/src/version.c 2007-12-21 00:00:07.000000000 -0500 8866 @@ -667,6 +667,320 @@ 7953 8867 static int included_patches[] = 7954 8868 { /* Add new patch number below this line */ 7955 8869 /**/ 8870 + 175, 8871 +/**/ 8872 + 174, 8873 +/**/ 8874 + 173, 8875 +/**/ 8876 + 172, 8877 +/**/ 8878 + 171, 8879 +/**/ 8880 + 170, 8881 +/**/ 8882 + 169, 8883 +/**/ 8884 + 167, 8885 +/**/ 8886 + 166, 8887 +/**/ 8888 + 165, 8889 +/**/ 8890 + 164, 8891 +/**/ 8892 + 163, 8893 +/**/ 8894 + 162, 8895 +/**/ 8896 + 161, 8897 +/**/ 8898 + 160, 8899 +/**/ 8900 + 159, 8901 +/**/ 8902 + 157, 8903 +/**/ 8904 + 156, 8905 +/**/ 8906 + 155, 8907 +/**/ 8908 + 154, 8909 +/**/ 8910 + 153, 8911 +/**/ 8912 + 152, 8913 +/**/ 8914 + 151, 8915 +/**/ 8916 + 150, 8917 +/**/ 8918 + 149, 8919 +/**/ 8920 + 148, 8921 +/**/ 8922 + 147, 8923 +/**/ 7956 8924 + 145, 7957 8925 +/**/ … … 8218 9186 8219 9187 diff -Naur vim71.orig/src/vim.h vim71/src/vim.h 8220 --- vim71.orig/src/vim.h 2007-05-12 0 2:53:29.000000000 -07008221 +++ vim71/src/vim.h 2007-1 0-29 08:09:18.000000000 -07009188 --- vim71.orig/src/vim.h 2007-05-12 05:53:29.000000000 -0400 9189 +++ vim71/src/vim.h 2007-12-20 23:57:45.000000000 -0500 8222 9190 @@ -1380,8 +1380,14 @@ 8223 9191 #endif … … 8238 9206 # define MB_STRNICMP(d, s, n) STRNICMP((d), (s), (n)) 8239 9207 diff -Naur vim71.orig/src/vimtutor vim71/src/vimtutor 8240 --- vim71.orig/src/vimtutor 2004-06-07 07:32:27.000000000 -07008241 +++ vim71/src/vimtutor 2007-1 0-29 08:09:16.000000000 -07009208 --- vim71.orig/src/vimtutor 2004-06-07 10:32:27.000000000 -0400 9209 +++ vim71/src/vimtutor 2007-12-20 23:57:06.000000000 -0500 8242 9210 @@ -39,18 +39,22 @@ 8243 9211 # remove the copy of the tutor on exit … … 8274 9242 # Use Vim to copy the tutor, it knows the value of $VIMRUNTIME 8275 9243 diff -Naur vim71.orig/src/window.c vim71/src/window.c 8276 --- vim71.orig/src/window.c 2007-05-07 1 2:25:30.000000000 -07008277 +++ vim71/src/window.c 2007-1 0-29 08:09:40.000000000 -07009244 --- vim71.orig/src/window.c 2007-05-07 15:25:30.000000000 -0400 9245 +++ vim71/src/window.c 2007-12-20 23:59:05.000000000 -0500 8278 9246 @@ -75,6 +75,7 @@ 8279 9247 static win_T *restore_snapshot_rec __ARGS((frame_T *sn, frame_T *fr)); … … 8756 9724 +} 8757 9725 +#endif 9726 diff -Naur vim71.orig/src/xxd/xxd.c vim71/src/xxd/xxd.c 9727 --- vim71.orig/src/xxd/xxd.c 2007-05-07 15:41:57.000000000 -0400 9728 +++ vim71/src/xxd/xxd.c 2007-12-20 23:59:57.000000000 -0500 9729 @@ -212,7 +212,7 @@ 9730 9731 #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */ 9732 #define COLS 256 /* change here, if you ever need more columns */ 9733 -#define LLEN (9 + (5*COLS-1)/2 + 2 + COLS) 9734 +#define LLEN (11 + (9*COLS-1)/1 + COLS + 2) 9735 9736 char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa; 9737 9738 @@ -590,7 +590,8 @@ 9739 default: octspergrp = 0; break; 9740 } 9741 9742 - if (cols < 1 || (!hextype && (cols > COLS))) 9743 + if (cols < 1 || ((hextype == HEX_NORMAL || hextype == HEX_BITS) 9744 + && (cols > COLS))) 9745 { 9746 fprintf(stderr, "%s: invalid number of columns (max. %d).\n", pname, COLS); 9747 exit(1); 9748 @@ -750,6 +751,7 @@ 9749 } 9750 if (ebcdic) 9751 e = (e < 64) ? '.' : etoa64[e-64]; 9752 + /* When changing this update definition of LLEN above. */ 9753 l[11 + (grplen * cols - 1)/octspergrp + p] = 9754 #ifdef __MVS__ 9755 (e >= 64)
Note:
See TracChangeset
for help on using the changeset viewer.