From a3bfcce13f6e53f440a06b83f61c93d2c42df0fc Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 14:25:05 +0100 Subject: [PATCH 001/106] updated for version 7.3.755 Problem: Autoconf doesn't find Python 3 if it's called "python". Solution: Search for "python2" and "python3" first, then "python". --- src/auto/configure | 18 ++++++++++++++---- src/configure.in | 4 ++-- src/version.c | 2 ++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/auto/configure b/src/auto/configure index 65f74fc8ca..e73867f9a6 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -5214,8 +5214,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5 $as_echo "$enable_pythoninterp" >&6; } if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then - # Extract the first word of "python", so it can be a program name with args. -set dummy python; ac_word=$2 + for ac_prog in python2 python +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_vi_cv_path_python+set}" = set; then : @@ -5254,6 +5256,9 @@ $as_echo "no" >&6; } fi + test -n "$vi_cv_path_python" && break +done + if test "X$vi_cv_path_python" != "X"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5 @@ -5509,8 +5514,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5 $as_echo "$enable_python3interp" >&6; } if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then - # Extract the first word of "python3", so it can be a program name with args. -set dummy python3; ac_word=$2 + for ac_prog in python3 python +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_vi_cv_path_python3+set}" = set; then : @@ -5549,6 +5556,9 @@ $as_echo "no" >&6; } fi + test -n "$vi_cv_path_python3" && break +done + if test "X$vi_cv_path_python3" != "X"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5 diff --git a/src/configure.in b/src/configure.in index 387d85e89a..2dae429613 100644 --- a/src/configure.in +++ b/src/configure.in @@ -838,7 +838,7 @@ AC_ARG_ENABLE(pythoninterp, AC_MSG_RESULT($enable_pythoninterp) if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then dnl -- find the python executable - AC_PATH_PROG(vi_cv_path_python, python) + AC_PATH_PROGS(vi_cv_path_python, python2 python) if test "X$vi_cv_path_python" != "X"; then dnl -- get its version number @@ -1028,7 +1028,7 @@ AC_ARG_ENABLE(python3interp, AC_MSG_RESULT($enable_python3interp) if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then dnl -- find the python3 executable - AC_PATH_PROG(vi_cv_path_python3, python3) + AC_PATH_PROGS(vi_cv_path_python3, python3 python) if test "X$vi_cv_path_python3" != "X"; then dnl -- get its version number diff --git a/src/version.c b/src/version.c index 53be01c887..de2329ef0e 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 755, /**/ 754, /**/ From 6be49626368d948caa08de9f6a419454af463d91 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 14:25:05 +0100 Subject: [PATCH 002/106] Added tag v7-3-755 for changeset d9b4cf53be2e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d66e05e1cb..1920566390 100644 --- a/.hgtags +++ b/.hgtags @@ -2091,3 +2091,4 @@ d149f18b289fdf19363214e7805a0637307bd264 v7-3-751 ed936effb1f374004db15f092b8c8ab87631fdd4 v7-3-752 c83cd3d01128204d6926550cbe1064daaf8dee8c v7-3-753 beceb0a18c79b5b1bda4822b34cb2d62b2967d27 v7-3-754 +d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 From aaad17942a01037861b369df116e14ee10afa65e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 15:55:20 +0100 Subject: [PATCH 003/106] updated for version 7.3.756 Problem: A location list can get a wrong count in :lvimgrep. Solution: Check if the list was changed by autocommands. (mostly by Christian Brabandt) --- src/quickfix.c | 34 ++++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 2 files changed, 36 insertions(+) diff --git a/src/quickfix.c b/src/quickfix.c index ac9366952b..2f8155a4c9 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3109,6 +3109,9 @@ ex_vimgrep(eap) char_u *p; int fi; qf_info_T *qi = &ql_info; +#ifdef FEAT_AUTOCMD + qfline_T *cur_qf_start; +#endif qfline_T *prevp = NULL; long lnum; buf_T *buf; @@ -3218,6 +3221,12 @@ ex_vimgrep(eap) * ":lcd %:p:h" changes the meaning of short path names. */ mch_dirname(dirname_start, MAXPATHL); +#ifdef FEAT_AUTOCMD + /* Remeber the value of qf_start, so that we can check for autocommands + * changing the current quickfix list. */ + cur_qf_start = qi->qf_lists[qi->qf_curlist].qf_start; +#endif + seconds = (time_t)0; for (fi = 0; fi < fcount && !got_int && tomatch > 0; ++fi) { @@ -3273,6 +3282,28 @@ ex_vimgrep(eap) /* Use existing, loaded buffer. */ using_dummy = FALSE; +#ifdef FEAT_AUTOCMD + if (cur_qf_start != qi->qf_lists[qi->qf_curlist].qf_start) + { + int idx; + + /* Autocommands changed the quickfix list. Find the one we were + * using and restore it. */ + for (idx = 0; idx < LISTCOUNT; ++idx) + if (cur_qf_start == qi->qf_lists[idx].qf_start) + { + qi->qf_curlist = idx; + break; + } + if (idx == LISTCOUNT) + { + /* List cannot be found, create a new one. */ + qf_new_list(qi, *eap->cmdlinep); + cur_qf_start = qi->qf_lists[qi->qf_curlist].qf_start; + } + } +#endif + if (buf == NULL) { if (!got_int) @@ -3324,6 +3355,9 @@ ex_vimgrep(eap) if (got_int) break; } +#ifdef FEAT_AUTOCMD + cur_qf_start = qi->qf_lists[qi->qf_curlist].qf_start; +#endif if (using_dummy) { diff --git a/src/version.c b/src/version.c index de2329ef0e..aec15bdd02 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 756, /**/ 755, /**/ From 7c6ed390c9b9e20acf94cba0b012b77c94b6cfd1 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 15:55:20 +0100 Subject: [PATCH 004/106] Added tag v7-3-756 for changeset 706c87d16d40 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1920566390..dcf4bbae7e 100644 --- a/.hgtags +++ b/.hgtags @@ -2092,3 +2092,4 @@ ed936effb1f374004db15f092b8c8ab87631fdd4 v7-3-752 c83cd3d01128204d6926550cbe1064daaf8dee8c v7-3-753 beceb0a18c79b5b1bda4822b34cb2d62b2967d27 v7-3-754 d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 +706c87d16d40ecdf9c6fba45bc47b911d8e140cc v7-3-756 From 529833bae9f6551c7d7341987560d41d5bdd09b8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 16:11:36 +0100 Subject: [PATCH 005/106] updated for version 7.3.757 Problem: Issue 96: May access freed memory when a put command triggers autocommands. (Dominique Pelle) Solution: Call u_save() before getting y_array. --- src/ops.c | 6 ++++++ src/version.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/ops.c b/src/ops.c index f08e576cfe..9b669b3317 100644 --- a/src/ops.c +++ b/src/ops.c @@ -3351,6 +3351,12 @@ do_put(regname, dir, count, flags) return; } +#ifdef FEAT_AUTOCMD + /* Autocommands may be executed when saving lines for undo, which may make + * y_array invalid. Start undo now to avoid that. */ + u_save(curwin->w_cursor.lnum, curwin->w_cursor.lnum + 1); +#endif + if (insert_string != NULL) { y_type = MCHAR; diff --git a/src/version.c b/src/version.c index aec15bdd02..562bb043f5 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 757, /**/ 756, /**/ From 85161f1d97b71a7c2388dbf9867750c010116718 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 16:11:36 +0100 Subject: [PATCH 006/106] Added tag v7-3-757 for changeset 65ef7c96d65f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dcf4bbae7e..4e428a0fca 100644 --- a/.hgtags +++ b/.hgtags @@ -2093,3 +2093,4 @@ c83cd3d01128204d6926550cbe1064daaf8dee8c v7-3-753 beceb0a18c79b5b1bda4822b34cb2d62b2967d27 v7-3-754 d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 706c87d16d40ecdf9c6fba45bc47b911d8e140cc v7-3-756 +65ef7c96d65fb2fbf660797608809f0ac5d0c4b7 v7-3-757 From 5579bc07c8b8bb17076aa97bb83595fff8de8e2c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 16:43:58 +0100 Subject: [PATCH 007/106] updated for version 7.3.758 Problem: Matchit plugin does not handle space in #ifdef. Solution: Change matching pattern to allow spaces. (Mike Morearty) --- runtime/macros/matchit.vim | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim index 03dae6a2f7..74c1a1eb92 100644 --- a/runtime/macros/matchit.vim +++ b/runtime/macros/matchit.vim @@ -131,7 +131,7 @@ function! s:Match_wrapper(word, forward, mode) range " let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+', " \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>' let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . - \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' + \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>' " s:all = pattern with all the keywords let match_words = match_words . (strlen(match_words) ? "," : "") . default if match_words !~ s:notslash . '\\\d' @@ -649,7 +649,7 @@ fun! s:MultiMatch(spflag, mode) " s:all regexp based on s:pat and the default groups " This part is copied and slightly modified from s:Match_wrapper(). let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") . - \ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>' + \ '\/\*:\*\/,#\s*if\%(def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>' " Allow b:match_words = "GetVimMatchWords()" . if b:match_words =~ ":" let match_words = b:match_words diff --git a/src/version.c b/src/version.c index 562bb043f5..5a0f8159bc 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 758, /**/ 757, /**/ From 8dbf1b3558a223062725f5edceb84c93cecabb02 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 16:43:58 +0100 Subject: [PATCH 008/106] Added tag v7-3-758 for changeset 9eb0d30510f7 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 4e428a0fca..ae21946a48 100644 --- a/.hgtags +++ b/.hgtags @@ -2094,3 +2094,4 @@ beceb0a18c79b5b1bda4822b34cb2d62b2967d27 v7-3-754 d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 706c87d16d40ecdf9c6fba45bc47b911d8e140cc v7-3-756 65ef7c96d65fb2fbf660797608809f0ac5d0c4b7 v7-3-757 +9eb0d30510f7b02aa5f55f400bfab08d847ab447 v7-3-758 From 2775240d121eb8d08d38b001e0a6bcd630f51eef Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 17:12:25 +0100 Subject: [PATCH 009/106] updated for version 7.3.759 Problem: MS-Windows: Updating the tabline is slow when there are many tabs. Solution: Disable redrawing while performing the update. (Arseny Kapoulkine) --- src/gui_w48.c | 11 ++++++++--- src/version.c | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui_w48.c b/src/gui_w48.c index 61c53a7d6f..a70fb259ea 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -2452,7 +2452,6 @@ gui_mch_update_tabline(void) TCITEM tie; int nr = 0; int curtabidx = 0; - RECT rc; #ifdef FEAT_MBYTE static int use_unicode = FALSE; int uu; @@ -2479,13 +2478,16 @@ gui_mch_update_tabline(void) tie.mask = TCIF_TEXT; tie.iImage = -1; + /* Disable redraw for tab updates to eliminate O(N^2) draws. */ + SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)FALSE, 0); + /* Add a label for each tab page. They all contain the same text area. */ for (tp = first_tabpage; tp != NULL; tp = tp->tp_next, ++nr) { if (tp == curtab) curtabidx = nr; - if (!TabCtrl_GetItemRect(s_tabhwnd, nr, &rc)) + if (nr >= TabCtrl_GetItemCount(s_tabhwnd)) { /* Add the tab */ tie.pszText = "-Empty-"; @@ -2519,11 +2521,14 @@ gui_mch_update_tabline(void) } /* Remove any old labels. */ - while (TabCtrl_GetItemRect(s_tabhwnd, nr, &rc)) + while (nr < TabCtrl_GetItemCount(s_tabhwnd)) TabCtrl_DeleteItem(s_tabhwnd, nr); if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx) TabCtrl_SetCurSel(s_tabhwnd, curtabidx); + + /* Re-enable redraw. This should trigger a repaint. */ + SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0); } /* diff --git a/src/version.c b/src/version.c index 5a0f8159bc..e743fae508 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 759, /**/ 758, /**/ From f69c630f337c3d291894fe16a4be0b30c963fd88 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 17:12:25 +0100 Subject: [PATCH 010/106] Added tag v7-3-759 for changeset 25ea15fdfa5c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ae21946a48..7c124752b9 100644 --- a/.hgtags +++ b/.hgtags @@ -2095,3 +2095,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 706c87d16d40ecdf9c6fba45bc47b911d8e140cc v7-3-756 65ef7c96d65fb2fbf660797608809f0ac5d0c4b7 v7-3-757 9eb0d30510f7b02aa5f55f400bfab08d847ab447 v7-3-758 +25ea15fdfa5c7d5894a06814fe9411b75050ebff v7-3-759 From 5f5db2017f80c0b7fcde94ee2f99d78a912b304f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 17:33:32 +0100 Subject: [PATCH 011/106] updated for version 7.3.760 Problem: dv_ deletes the white space before the line. Solution: Move the cursor to the first non-white. (Christian Brabandt) --- src/normal.c | 4 +++- src/testdir/test19.in | 6 +++++- src/testdir/test19.ok | 1 + src/version.c | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/normal.c b/src/normal.c index d6773697aa..869ada37af 100644 --- a/src/normal.c +++ b/src/normal.c @@ -8628,7 +8628,9 @@ nv_lineop(cap) cap->oap->motion_type = MLINE; if (cursor_down(cap->count1 - 1L, cap->oap->op_type == OP_NOP) == FAIL) clearopbeep(cap->oap); - else if ( cap->oap->op_type == OP_DELETE + else if ( (cap->oap->op_type == OP_DELETE /* only with linewise motions */ + && cap->oap->motion_force != 'v' + && cap->oap->motion_force != Ctrl_V) || cap->oap->op_type == OP_LSHIFT || cap->oap->op_type == OP_RSHIFT) beginline(BL_SOL | BL_FIX); diff --git a/src/testdir/test19.in b/src/testdir/test19.in index cbb4dd2c22..aafa34e521 100644 --- a/src/testdir/test19.in +++ b/src/testdir/test19.in @@ -1,4 +1,5 @@ Tests for "r" with 'smarttab' and 'expandtab' set/not set. +Also test that dv_ works correctly STARTTEST :so small.vim @@ -16,7 +17,9 @@ r :" Test that copyindent works with expandtab set :set expandtab smartindent copyindent ts=8 sw=8 sts=8 o{ -x:?^start?,$w! test.out +x:set nosol +/Second line/ +fwdv_:?^start?,$w! test.out :qa! ENDTEST @@ -27,3 +30,4 @@ test text a cde f ghi test text + Second line beginning with whitespace diff --git a/src/testdir/test19.ok b/src/testdir/test19.ok index 23d51507db..4146214919 100644 --- a/src/testdir/test19.ok +++ b/src/testdir/test19.ok @@ -7,3 +7,4 @@ test text test text { x + with whitespace diff --git a/src/version.c b/src/version.c index e743fae508..3f889b6ab7 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 760, /**/ 759, /**/ From cb822b519b121ed2060c7933eb8bed25cb15d806 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 17:33:33 +0100 Subject: [PATCH 012/106] Added tag v7-3-760 for changeset 8e54a32bcd56 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7c124752b9..6854b1408f 100644 --- a/.hgtags +++ b/.hgtags @@ -2096,3 +2096,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 65ef7c96d65fb2fbf660797608809f0ac5d0c4b7 v7-3-757 9eb0d30510f7b02aa5f55f400bfab08d847ab447 v7-3-758 25ea15fdfa5c7d5894a06814fe9411b75050ebff v7-3-759 +8e54a32bcd56226647cfd3d8c5e142e3a98c0ca7 v7-3-760 From b695049737e73f2f310f50e7b57d6acb73578eb0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 18:20:32 +0100 Subject: [PATCH 013/106] updated for version 7.3.761 Problem: In Visual mode a "-p does not work. (Marcin Szamotulski) Solution: Avoid writing to "- before putting it. (Christian Brabandt) --- src/normal.c | 5 +++-- src/testdir/test48.in | 4 ++++ src/testdir/test48.ok | 1 + src/version.c | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/normal.c b/src/normal.c index 869ada37af..4d0bbdbea5 100644 --- a/src/normal.c +++ b/src/normal.c @@ -9412,14 +9412,15 @@ nv_put(cap) # ifdef FEAT_CLIPBOARD adjust_clip_reg(®name); # endif - if (regname == 0 || regname == '"' || VIM_ISDIGIT(regname) + if (regname == 0 || regname == '"' + || VIM_ISDIGIT(regname) || regname == '-' # ifdef FEAT_CLIPBOARD || (clip_unnamed && (regname == '*' || regname == '+')) # endif ) { - /* the delete is going to overwrite the register we want to + /* The delete is going to overwrite the register we want to * put, save it first. */ reg1 = get_register(regname, TRUE); } diff --git a/src/testdir/test48.in b/src/testdir/test48.in index 2179fe6648..48f4abbf75 100644 --- a/src/testdir/test48.in +++ b/src/testdir/test48.in @@ -54,8 +54,12 @@ $5lrxa<-- should be 'x' ^O3li4li4li <-- should show the name of a noted text editor ^o4li4li4li <-- and its version number-dd :" +:" Test for yanking and pasting using the small delete register +gg/^foo +dewve"-p :wq! test.out ENDTEST +foo, bar keyword keyw all your base are belong to us 1 2 3 4 5 6 diff --git a/src/testdir/test48.ok b/src/testdir/test48.ok index 4fcbe5086e..334cb5a29c 100644 --- a/src/testdir/test48.ok +++ b/src/testdir/test48.ok @@ -1,3 +1,4 @@ +, foo keyword keyword all your base are belong to vim diff --git a/src/version.c b/src/version.c index 3f889b6ab7..5e7b397068 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 761, /**/ 760, /**/ From bb846b6b966938f8a212ac9d1168a0112a8a6143 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 12 Dec 2012 18:20:32 +0100 Subject: [PATCH 014/106] Added tag v7-3-761 for changeset 6834d6aeae09 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 6854b1408f..acad0fb474 100644 --- a/.hgtags +++ b/.hgtags @@ -2097,3 +2097,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 9eb0d30510f7b02aa5f55f400bfab08d847ab447 v7-3-758 25ea15fdfa5c7d5894a06814fe9411b75050ebff v7-3-759 8e54a32bcd56226647cfd3d8c5e142e3a98c0ca7 v7-3-760 +6834d6aeae099d6bfdff5151aa2174cafc22647f v7-3-761 From f1a14b8b6fc988db1ae98b52ac53ccb20c5742ac Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 16 Dec 2012 12:50:39 +0100 Subject: [PATCH 015/106] updated for version 7.3.762 Problem: On some systems the tabline is not redrawn. Solution: Call RedrawWindow(). (Charles Peacech) --- src/gui_w48.c | 4 +++- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui_w48.c b/src/gui_w48.c index a70fb259ea..1d380fbf93 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -2527,8 +2527,10 @@ gui_mch_update_tabline(void) if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx) TabCtrl_SetCurSel(s_tabhwnd, curtabidx); - /* Re-enable redraw. This should trigger a repaint. */ + /* Re-enable redraw and redraw. */ SendMessage(s_tabhwnd, WM_SETREDRAW, (WPARAM)TRUE, 0); + RedrawWindow(s_tabhwnd, NULL, NULL, + RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); } /* diff --git a/src/version.c b/src/version.c index 5e7b397068..012ae87e3d 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 762, /**/ 761, /**/ From f8dda06603db45e15675b6005f020a099f9436f4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 16 Dec 2012 12:50:40 +0100 Subject: [PATCH 016/106] Added tag v7-3-762 for changeset 699f8d8f096d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index acad0fb474..d3aa0f1d17 100644 --- a/.hgtags +++ b/.hgtags @@ -2098,3 +2098,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 25ea15fdfa5c7d5894a06814fe9411b75050ebff v7-3-759 8e54a32bcd56226647cfd3d8c5e142e3a98c0ca7 v7-3-760 6834d6aeae099d6bfdff5151aa2174cafc22647f v7-3-761 +699f8d8f096d4627f97e8d3bcf64b8634a484c26 v7-3-762 From f0c569a165ea9ac46e29a6e0696f7a3f5f516bbf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 13:24:08 +0100 Subject: [PATCH 017/106] updated for version 7.3.763 Problem: Jumping to a mark does not open a fold if it is in the same line. (Wiktor Ruben) Solution: Also compare the column after the jump. (Christian Brabandt) --- src/normal.c | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/normal.c b/src/normal.c index 4d0bbdbea5..3d5b6d8171 100644 --- a/src/normal.c +++ b/src/normal.c @@ -7523,7 +7523,7 @@ nv_gomark(cap) pos_T *pos; int c; #ifdef FEAT_FOLDING - linenr_T lnum = curwin->w_cursor.lnum; + pos_T old_cursor = curwin->w_cursor; int old_KeyTyped = KeyTyped; /* getting file may reset it */ #endif @@ -7552,7 +7552,7 @@ nv_gomark(cap) #endif #ifdef FEAT_FOLDING if (cap->oap->op_type == OP_NOP - && (pos == (pos_T *)-1 || lnum != curwin->w_cursor.lnum) + && (pos == (pos_T *)-1 || !equalpos(old_cursor, *pos)) && (fdo_flags & FDO_MARK) && old_KeyTyped) foldOpenCursor(); diff --git a/src/version.c b/src/version.c index 012ae87e3d..83b1bc4ad7 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 763, /**/ 762, /**/ From be1eda6a25584eb668dfd197f1bbba0e0e090f08 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 13:24:08 +0100 Subject: [PATCH 018/106] Added tag v7-3-763 for changeset b6148e4a9c39 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d3aa0f1d17..862eadc8df 100644 --- a/.hgtags +++ b/.hgtags @@ -2099,3 +2099,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 8e54a32bcd56226647cfd3d8c5e142e3a98c0ca7 v7-3-760 6834d6aeae099d6bfdff5151aa2174cafc22647f v7-3-761 699f8d8f096d4627f97e8d3bcf64b8634a484c26 v7-3-762 +b6148e4a9c397b5dd1716cdac2f96730bd0f353d v7-3-763 From af9d249e1ffebfa4f278018fe24d557754f8ddaf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 13:37:32 +0100 Subject: [PATCH 019/106] updated for version 7.3.764 Problem: Not all message translation files are installed. Solution: Also install the converted files. --- src/po/Makefile | 24 +++++++++++++++++------- src/version.c | 2 ++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/po/Makefile b/src/po/Makefile index c049d6a94c..2814b3fe8a 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -34,6 +34,16 @@ LANGUAGES = \ zh_TW \ zh_TW.UTF-8 +CONVERTED = \ + cs.cp1250 \ + ja.sjis \ + pl.cp1250 \ + pl.UTF-8 \ + ru.cp1251 \ + sk.cp1250 \ + uk.cp1251 \ + zh_CN.cp936 + MOFILES = \ af.mo \ ca.mo \ @@ -64,7 +74,7 @@ MOFILES = \ zh_TW.UTF-8.mo \ zh_TW.mo -CONVERTED = \ +MOCONVERTED = \ cs.cp1250.mo \ ja.sjis.mo \ pl.cp1250.mo \ @@ -126,7 +136,7 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge .SUFFIXES: .SUFFIXES: .po .mo .pot .ck -.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) +.PHONY: all install uninstall prefixcheck converted check clean checkclean distclean update-po $(LANGUAGES) $(CONVERTED) .po.mo: $(MSGFMT) -o $@ $< @@ -135,13 +145,13 @@ MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge $(VIM) -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq $< touch $@ -all: $(MOFILES) +all: $(MOFILES) $(MOCONVERTED) check: $(CHECKFILES) -install: $(MOFILES) +install: $(MOFILES) $(MOCONVERTED) @$(MAKE) prefixcheck - for lang in $(LANGUAGES); do \ + for lang in $(LANGUAGES) $(CONVERTED); do \ dir=$(LOCALEDIR)/$$lang/; \ if test ! -x "$$dir"; then \ mkdir $$dir; chmod 755 $$dir; \ @@ -158,13 +168,13 @@ install: $(MOFILES) uninstall: @$(MAKE) prefixcheck - for cat in $(MOFILES); do \ + for cat in $(MOFILES) $(MOCONVERTED); do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \ done -converted: $(CONVERTED) +converted: $(MOCONVERTED) # Norwegian/Bokmal: "nb" is an alias for "no". # Copying the file is not efficient, but I don't know of another way to make diff --git a/src/version.c b/src/version.c index 83b1bc4ad7..c9bf6ded7c 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 764, /**/ 763, /**/ From 78b3be7cbb32b79502a34fc76fcedf3c33257163 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 13:37:32 +0100 Subject: [PATCH 020/106] Added tag v7-3-764 for changeset b29e55d0ef01 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 862eadc8df..49e4a7ff0f 100644 --- a/.hgtags +++ b/.hgtags @@ -2100,3 +2100,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 6834d6aeae099d6bfdff5151aa2174cafc22647f v7-3-761 699f8d8f096d4627f97e8d3bcf64b8634a484c26 v7-3-762 b6148e4a9c397b5dd1716cdac2f96730bd0f353d v7-3-763 +b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764 From 80640894cc7c342c148a78856b2af97a4e851c74 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 14:00:11 +0100 Subject: [PATCH 021/106] updated for version 7.3.765 Problem: Segfault when doing "cclose" on BufUnload in a python function. (Sean Reifschneider) Solution: Skip window with NULL buffer. (Christian Brabandt) --- src/main.c | 3 +++ src/version.c | 2 ++ src/window.c | 11 +++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 66726d2790..6581ba9397 100644 --- a/src/main.c +++ b/src/main.c @@ -1376,6 +1376,9 @@ getout(exitval) for (wp = (tp == curtab) ? firstwin : tp->tp_firstwin; wp != NULL; wp = wp->w_next) { + if (wp->w_buffer == NULL) + /* Autocmd must have close the buffer already, skip. */ + continue; buf = wp->w_buffer; if (buf->b_changedtick != -1) { diff --git a/src/version.c b/src/version.c index c9bf6ded7c..375b07d491 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 765, /**/ 764, /**/ diff --git a/src/window.c b/src/window.c index e37450d98e..b5d4afd2b4 100644 --- a/src/window.c +++ b/src/window.c @@ -2276,9 +2276,15 @@ win_close(win, free_buf) #endif } + if (only_one_window() && win_valid(win) && win->w_buffer == NULL + && (last_window() || curtab != prev_curtab + || close_last_window_tabpage(win, free_buf, prev_curtab))) + /* Autocommands have close all windows, quit now. */ + getout(0); + /* Autocommands may have closed the window already, or closed the only * other window or moved to another tab page. */ - if (!win_valid(win) || last_window() || curtab != prev_curtab + else if (!win_valid(win) || last_window() || curtab != prev_curtab || close_last_window_tabpage(win, free_buf, prev_curtab)) return; @@ -6282,7 +6288,8 @@ only_one_window() return FALSE; for (wp = firstwin; wp != NULL; wp = wp->w_next) - if ((!((wp->w_buffer->b_help && !curbuf->b_help) + if (wp->w_buffer != NULL + && (!((wp->w_buffer->b_help && !curbuf->b_help) # ifdef FEAT_QUICKFIX || wp->w_p_pvw # endif From 88297797f257a983b169f7f8b8c266ae3f0cfc2e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 14:00:12 +0100 Subject: [PATCH 022/106] Added tag v7-3-765 for changeset 915fb3d2dd8f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 49e4a7ff0f..c3cacf5493 100644 --- a/.hgtags +++ b/.hgtags @@ -2101,3 +2101,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 699f8d8f096d4627f97e8d3bcf64b8634a484c26 v7-3-762 b6148e4a9c397b5dd1716cdac2f96730bd0f353d v7-3-763 b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764 +915fb3d2dd8ffc322a5cc9e294d9bb7dfa8c5a83 v7-3-765 From 5ba9855cdcd4435413d15aa29b9f95d02cba63f5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 14:09:44 +0100 Subject: [PATCH 023/106] updated for version 7.3.766 Problem: ":help cpo-*" jumps to the wrong place. Solution: Make it equivalent to ":help cpo-star". --- src/ex_cmds.c | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index a217402476..712ba4ff9d 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5849,14 +5849,14 @@ find_help_tags(arg, num_matches, matches, keep_lang) int i; static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*", "/*", "/\\*", "\"*", "**", - "/\\(\\)", + "cpo-*", "/\\(\\)", "?", ":?", "?", "g?", "g?g?", "g??", "z?", "/\\?", "/\\z(\\)", "\\=", ":s\\=", "[count]", "[quotex]", "[range]", "[pattern]", "\\|", "\\%$"}; static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", "/star", "/\\\\star", "quotestar", "starstar", - "/\\\\(\\\\)", + "cpo-star", "/\\\\(\\\\)", "?", ":?", "?", "g?", "g?g?", "g??", "z?", "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", "\\[count]", "\\[quotex]", "\\[range]", diff --git a/src/version.c b/src/version.c index 375b07d491..444a3d92ac 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 766, /**/ 765, /**/ From 8d94680ace6623b1e77909759e256d313b459ebb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 14:09:45 +0100 Subject: [PATCH 024/106] Added tag v7-3-766 for changeset b5103b7d9e12 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c3cacf5493..a57fd73272 100644 --- a/.hgtags +++ b/.hgtags @@ -2102,3 +2102,4 @@ d9b4cf53be2edbb872cc489aea32a4441b39eaf9 v7-3-755 b6148e4a9c397b5dd1716cdac2f96730bd0f353d v7-3-763 b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764 915fb3d2dd8ffc322a5cc9e294d9bb7dfa8c5a83 v7-3-765 +b5103b7d9e1284ef9ffbc7d1170d9105c0769c4d v7-3-766 From 02cc5f062f0c8bed570d2bdfc0784829c40ecefe Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 14:39:47 +0100 Subject: [PATCH 025/106] updated for version 7.3.767 Problem: (Win32) The _errno used for iconv may be the wrong one. Solution: Use the _errno from iconv.dll. (Ken Takata) --- src/mbyte.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- src/version.c | 2 ++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/mbyte.c b/src/mbyte.c index 33e894e88c..5f82edf8d6 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -3242,7 +3242,7 @@ utf_strnicmp(s1, s2, n1, n2) /* * Version of strnicmp() that handles multi-byte characters. - * Needed for Big5, Sjift-JIS and UTF-8 encoding. Other DBCS encodings can + * Needed for Big5, Shift-JIS and UTF-8 encoding. Other DBCS encodings can * probably use strnicmp(), because there are no ASCII characters in the * second byte. * Returns zero if s1 and s2 are equal (ignoring case), the difference between @@ -4293,6 +4293,44 @@ static HINSTANCE hMsvcrtDLL = 0; # define DYNAMIC_MSVCRT_DLL "msvcrt.dll" # endif +/* + * Get the address of 'funcname' which is imported by 'hInst' DLL. + */ + static void * +get_iconv_import_func(HINSTANCE hInst, const char *funcname) +{ + PBYTE pImage = (PBYTE)hInst; + PIMAGE_DOS_HEADER pDOS = (PIMAGE_DOS_HEADER)hInst; + PIMAGE_NT_HEADERS pPE; + PIMAGE_IMPORT_DESCRIPTOR pImpDesc; + PIMAGE_THUNK_DATA pIAT; /* Import Address Table */ + PIMAGE_THUNK_DATA pINT; /* Import Name Table */ + PIMAGE_IMPORT_BY_NAME pImpName; + + if (pDOS->e_magic != IMAGE_DOS_SIGNATURE) + return NULL; + pPE = (PIMAGE_NT_HEADERS)(pImage + pDOS->e_lfanew); + if (pPE->Signature != IMAGE_NT_SIGNATURE) + return NULL; + pImpDesc = (PIMAGE_IMPORT_DESCRIPTOR)(pImage + + pPE->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT] + .VirtualAddress); + for (; pImpDesc->FirstThunk; ++pImpDesc) + { + pIAT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->FirstThunk); + pINT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->OriginalFirstThunk); + for (; pIAT->u1.Function; ++pIAT, ++pINT) + { + if (IMAGE_SNAP_BY_ORDINAL(pINT->u1.Ordinal)) + continue; + pImpName = (PIMAGE_IMPORT_BY_NAME)(pImage + pINT->u1.AddressOfData); + if (strcmp(pImpName->Name, funcname) == 0) + return (void *)pIAT->u1.Function; + } + } + return NULL; +} + /* * Try opening the iconv.dll and return TRUE if iconv() can be used. */ @@ -4326,7 +4364,9 @@ iconv_enabled(verbose) iconv_open = (void *)GetProcAddress(hIconvDLL, "libiconv_open"); iconv_close = (void *)GetProcAddress(hIconvDLL, "libiconv_close"); iconvctl = (void *)GetProcAddress(hIconvDLL, "libiconvctl"); - iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno"); + iconv_errno = get_iconv_import_func(hIconvDLL, "_errno"); + if (iconv_errno == NULL) + iconv_errno = (void *)GetProcAddress(hMsvcrtDLL, "_errno"); if (iconv == NULL || iconv_open == NULL || iconv_close == NULL || iconvctl == NULL || iconv_errno == NULL) { diff --git a/src/version.c b/src/version.c index 444a3d92ac..3217400109 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 767, /**/ 766, /**/ From afbc68e5c3e76b41cd31b87b4e104828157f2257 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 14:39:47 +0100 Subject: [PATCH 026/106] Added tag v7-3-767 for changeset be1cffa1e477 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a57fd73272..da2d00269f 100644 --- a/.hgtags +++ b/.hgtags @@ -2103,3 +2103,4 @@ b6148e4a9c397b5dd1716cdac2f96730bd0f353d v7-3-763 b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764 915fb3d2dd8ffc322a5cc9e294d9bb7dfa8c5a83 v7-3-765 b5103b7d9e1284ef9ffbc7d1170d9105c0769c4d v7-3-766 +be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767 From 361a518c2c215113b9db540db9ff2c7429f9ba6b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 15:37:01 +0100 Subject: [PATCH 027/106] updated for version 7.3.768 Problem: settabvar() and setwinvar() may move the cursor. Solution: Save and restore the cursor position when appropriate. (idea by Yasuhiro Matsumoto) --- src/edit.c | 15 +++++++++++++++ src/version.c | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/edit.c b/src/edit.c index 0d94095466..50c1fca6bd 100644 --- a/src/edit.c +++ b/src/edit.c @@ -372,6 +372,8 @@ edit(cmdchar, startln, count) */ if (cmdchar != 'r' && cmdchar != 'v') { + pos_T save_cursor = curwin->w_cursor; + # ifdef FEAT_EVAL if (cmdchar == 'R') ptr = (char_u *)"r"; @@ -382,6 +384,19 @@ edit(cmdchar, startln, count) set_vim_var_string(VV_INSERTMODE, ptr, 1); # endif apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf); + + /* Since Insert mode was not started yet a call to check_cursor_col() + * may have moved the cursor, especially with the "A" command. */ + if (curwin->w_cursor.col != save_cursor.col + && curwin->w_cursor.lnum == save_cursor.lnum) + { + int save_state = State; + + curwin->w_cursor = save_cursor; + State = INSERT; + check_cursor_col(); + State = save_state; + } } #endif diff --git a/src/version.c b/src/version.c index 3217400109..251cec8133 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 768, /**/ 767, /**/ From dd726d160666f01b9cb1076ad35cc43480972485 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 15:37:02 +0100 Subject: [PATCH 028/106] Added tag v7-3-768 for changeset 9ea81cd9b1f5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index da2d00269f..5086c97f9c 100644 --- a/.hgtags +++ b/.hgtags @@ -2104,3 +2104,4 @@ b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764 915fb3d2dd8ffc322a5cc9e294d9bb7dfa8c5a83 v7-3-765 b5103b7d9e1284ef9ffbc7d1170d9105c0769c4d v7-3-766 be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767 +9ea81cd9b1f50054629547ce2eccfac1fa00d096 v7-3-768 From 365f5fa668985136258b955953aa199a64e5124c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 17:02:05 +0100 Subject: [PATCH 029/106] updated for version 7.3.769 Problem: 'matchpairs' does not work with multi-byte characters. Solution: Make it work. (Christian Brabandt) --- src/misc1.c | 12 ++-- src/option.c | 142 +++++++++++++++++++++++++++++++++++++++--- src/proto/option.pro | 1 + src/search.c | 70 +++++---------------- src/testdir/test69.in | 10 +++ src/testdir/test69.ok | 4 ++ src/version.c | 2 + 7 files changed, 176 insertions(+), 65 deletions(-) diff --git a/src/misc1.c b/src/misc1.c index 636fc4a07b..ab42f04db1 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2288,14 +2288,18 @@ ins_char_bytes(buf, charlen) */ if (p_sm && (State & INSERT) && msg_silent == 0 -#ifdef FEAT_MBYTE - && charlen == 1 -#endif #ifdef FEAT_INS_EXPAND && !ins_compl_active() #endif ) - showmatch(c); + { +#ifdef FEAT_MBYTE + if (has_mbyte) + showmatch(mb_ptr2char(buf)); + else +#endif + showmatch(c); + } #ifdef FEAT_RIGHTLEFT if (!p_ri || (State & REPLACE_FLAG)) diff --git a/src/option.c b/src/option.c index d8eb314d4a..8f52406022 100644 --- a/src/option.c +++ b/src/option.c @@ -6149,16 +6149,46 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf, /* 'matchpairs' */ else if (gvarp == &p_mps) { - /* Check for "x:y,x:y" */ - for (p = *varp; *p != NUL; p += 4) +#ifdef FEAT_MBYTE + if (has_mbyte) { - if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ',')) + for (p = *varp; *p != NUL; ++p) { - errmsg = e_invarg; - break; + int x2,x3 = -1; + + if (*p != NUL) + p += mb_ptr2len(p); + if (*p != NUL) + x2 = *p++; + if (*p != NUL) + { + x3 = mb_ptr2char(p); + p += mb_ptr2len(p); + } + if (x2 != ':' || x2 == -1 || x3 == -1 + || (*p != NUL && *p != ',')) + { + errmsg = e_invarg; + break; + } + if (*p == NUL) + break; + } + } + else +#endif + { + /* Check for "x:y,x:y" */ + for (p = *varp; *p != NUL; p += 4) + { + if (p[1] != ':' || p[2] == NUL || (p[3] != NUL && p[3] != ',')) + { + errmsg = e_invarg; + break; + } + if (p[3] == NUL) + break; } - if (p[3] == NUL) - break; } } @@ -11453,3 +11483,101 @@ get_sts_value() { return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts; } + +/* + * Check matchpairs option for "*initc". + * If there is a match set "*initc" to the matching character and "*findc" to + * the opposite character. Set "*backwards" to the direction. + * When "switchit" is TRUE swap the direction. + */ + void +find_mps_values(initc, findc, backwards, switchit) + int *initc; + int *findc; + int *backwards; + int switchit; +{ + char_u *ptr; + + ptr = curbuf->b_p_mps; + while (*ptr != NUL) + { +#ifdef FEAT_MBYTE + if (has_mbyte) + { + char_u *prev; + + if (mb_ptr2char(ptr) == *initc) + { + if (switchit) + { + *findc = *initc; + *initc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1); + *backwards = TRUE; + } + else + { + *findc = mb_ptr2char(ptr + mb_ptr2len(ptr) + 1); + *backwards = FALSE; + } + return; + } + prev = ptr; + ptr += mb_ptr2len(ptr) + 1; + if (mb_ptr2char(ptr) == *initc) + { + if (switchit) + { + *findc = *initc; + *initc = mb_ptr2char(prev); + *backwards = FALSE; + } + else + { + *findc = mb_ptr2char(prev); + *backwards = TRUE; + } + return; + } + ptr += mb_ptr2len(ptr); + } + else +#endif + { + if (*ptr == *initc) + { + if (switchit) + { + *backwards = TRUE; + *findc = *initc; + *initc = ptr[2]; + } + else + { + *backwards = FALSE; + *findc = ptr[2]; + } + return; + } + ptr += 2; + if (*ptr == *initc) + { + if (switchit) + { + *backwards = FALSE; + *findc = *initc; + *initc = ptr[-2]; + } + else + { + *backwards = TRUE; + *findc = ptr[-2]; + } + return; + } + ++ptr; + } + if (*ptr == ',') + ++ptr; + } +} diff --git a/src/proto/option.pro b/src/proto/option.pro index 63570fa4c5..ba0a4e1698 100644 --- a/src/proto/option.pro +++ b/src/proto/option.pro @@ -59,4 +59,5 @@ int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); int check_ff_value __ARGS((char_u *p)); long get_sw_value __ARGS((void)); long get_sts_value __ARGS((void)); +void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit)); /* vim: set ft=c : */ diff --git a/src/search.c b/src/search.c index d7bfc43b14..0b1c519fb2 100644 --- a/src/search.c +++ b/src/search.c @@ -1786,28 +1786,8 @@ findmatchlimit(oap, initc, flags, maxtravel) } else if (initc != '#' && initc != NUL) { - /* 'matchpairs' is "x:y,x:y" */ - for (ptr = curbuf->b_p_mps; *ptr; ptr += 2) - { - if (*ptr == initc) - { - findc = initc; - initc = ptr[2]; - backwards = TRUE; - break; - } - ptr += 2; - if (*ptr == initc) - { - findc = initc; - initc = ptr[-2]; - backwards = FALSE; - break; - } - if (ptr[1] != ',') - break; - } - if (!findc) /* invalid initc! */ + find_mps_values(&initc, &findc, &backwards, TRUE); + if (findc == NUL) return NULL; } /* @@ -1886,36 +1866,14 @@ findmatchlimit(oap, initc, flags, maxtravel) --pos.col; for (;;) { - initc = linep[pos.col]; + initc = PTR2CHAR(linep + pos.col); if (initc == NUL) break; - for (ptr = curbuf->b_p_mps; *ptr; ++ptr) - { - if (*ptr == initc) - { - findc = ptr[2]; - backwards = FALSE; - break; - } - ptr += 2; - if (*ptr == initc) - { - findc = ptr[-2]; - backwards = TRUE; - break; - } - if (!*++ptr) - break; - } + find_mps_values(&initc, &findc, &backwards, FALSE); if (findc) break; -#ifdef FEAT_MBYTE - if (has_mbyte) - pos.col += (*mb_ptr2len)(linep + pos.col); - else -#endif - ++pos.col; + pos.col += MB_PTR2LEN(linep + pos.col); } if (!findc) { @@ -2260,7 +2218,8 @@ findmatchlimit(oap, initc, flags, maxtravel) * inquote if the number of quotes in a line is even, unless this * line or the previous one ends in a '\'. Complicated, isn't it? */ - switch (c = linep[pos.col]) + c = PTR2CHAR(linep + pos.col); + switch (c) { case NUL: /* at end of line without trailing backslash, reset inquote */ @@ -2469,20 +2428,23 @@ showmatch(c) * Only show match for chars in the 'matchpairs' option. */ /* 'matchpairs' is "x:y,x:y" */ - for (p = curbuf->b_p_mps; *p != NUL; p += 2) + for (p = curbuf->b_p_mps; *p != NUL; ++p) { + if (PTR2CHAR(p) == c #ifdef FEAT_RIGHTLEFT - if (*p == c && (curwin->w_p_rl ^ p_ri)) - break; + && (curwin->w_p_rl ^ p_ri) #endif - p += 2; - if (*p == c + ) + break; + p += MB_PTR2LEN(p) + 1; + if (PTR2CHAR(p) == c #ifdef FEAT_RIGHTLEFT && !(curwin->w_p_rl ^ p_ri) #endif ) break; - if (p[1] != ',') + p += MB_PTR2LEN(p); + if (*p == NUL) return; } diff --git a/src/testdir/test69.in b/src/testdir/test69.in index 578f76bdf2..5c9a2f3d4c 100644 --- a/src/testdir/test69.in +++ b/src/testdir/test69.in @@ -1,4 +1,5 @@ Test for multi-byte text formatting. +Also test, that 'mps' with multibyte chars works. STARTTEST :so mbyte.vim @@ -133,6 +134,15 @@ ENDTEST } +STARTTEST +/^{/+1 +:set mps+=u2018:u2019 +d% +ENDTEST + +{ +‘ two three ’ four +} STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/^Results/,$wq! test.out diff --git a/src/testdir/test69.ok b/src/testdir/test69.ok index 3dfe402e98..59a5a6e54e 100644 --- a/src/testdir/test69.ok +++ b/src/testdir/test69.ok @@ -140,3 +140,7 @@ a a } + +{ + four +} diff --git a/src/version.c b/src/version.c index 251cec8133..6d15d58647 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 769, /**/ 768, /**/ From 1106504d46d7d48faebb9a34ad91974846057270 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 17:02:05 +0100 Subject: [PATCH 030/106] Added tag v7-3-769 for changeset d179a8eff9d7 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5086c97f9c..e80c2b5645 100644 --- a/.hgtags +++ b/.hgtags @@ -2105,3 +2105,4 @@ b29e55d0ef01c506ec48c0c5782e669bb1d80f14 v7-3-764 b5103b7d9e1284ef9ffbc7d1170d9105c0769c4d v7-3-766 be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767 9ea81cd9b1f50054629547ce2eccfac1fa00d096 v7-3-768 +d179a8eff9d7b0adc561f4a4dcfb0b7612c1f301 v7-3-769 From 3d1455b16cc02b49c607090df9a6ffd62c090599 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 17:17:26 +0100 Subject: [PATCH 031/106] updated for version 7.3.770 Problem: Vim.h indentation is inconsistent. Solution: Adjust the indentation. (Elias Diem) --- src/version.c | 2 ++ src/vim.h | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/version.c b/src/version.c index 6d15d58647..18fcd020f0 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 770, /**/ 769, /**/ diff --git a/src/vim.h b/src/vim.h index 35b23105b6..a501a71e4d 100644 --- a/src/vim.h +++ b/src/vim.h @@ -104,7 +104,7 @@ # endif #endif #if defined(MACOS_X) || defined(MACOS_CLASSIC) -# define MACOS +# define MACOS #endif #if defined(MACOS_X) && defined(MACOS_CLASSIC) Error: To compile for both MACOS X and Classic use a Classic Carbon @@ -490,7 +490,7 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */ # include # endif # if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H) -# include +# include # endif # ifdef HAVE_STAT_H # include @@ -515,22 +515,22 @@ typedef unsigned long u8char_T; /* long should be 32 bits or more */ # include #endif -# if defined(HAVE_SYS_SELECT_H) && \ +#if defined(HAVE_SYS_SELECT_H) && \ (!defined(HAVE_SYS_TIME_H) || defined(SYS_SELECT_WITH_SYS_TIME)) -# include -# endif +# include +#endif -# ifndef HAVE_SELECT -# ifdef HAVE_SYS_POLL_H -# include +#ifndef HAVE_SELECT +# ifdef HAVE_SYS_POLL_H +# include +# define HAVE_POLL +# else +# ifdef HAVE_POLL_H +# include # define HAVE_POLL -# else -# ifdef HAVE_POLL_H -# include -# define HAVE_POLL -# endif # endif # endif +#endif /* ================ end of the header file puzzle =============== */ @@ -1877,8 +1877,8 @@ typedef int proftime_T; /* dummy for function prototypes */ /* VIM_ATOM_NAME is the older Vim-specific selection type for X11. Still * supported for when a mix of Vim versions is used. VIMENC_ATOM_NAME includes * the encoding to support Vims using different 'encoding' values. */ -#define VIM_ATOM_NAME "_VIM_TEXT" -#define VIMENC_ATOM_NAME "_VIMENC_TEXT" +# define VIM_ATOM_NAME "_VIM_TEXT" +# define VIMENC_ATOM_NAME "_VIMENC_TEXT" /* Selection states for modeless selection */ # define SELECT_CLEARED 0 From cb4ca03414716e9d0be6968649f4fdb1c4fcdfaf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 17:17:26 +0100 Subject: [PATCH 032/106] Added tag v7-3-770 for changeset da7a7ba36ed2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e80c2b5645..16db06c1a1 100644 --- a/.hgtags +++ b/.hgtags @@ -2106,3 +2106,4 @@ b5103b7d9e1284ef9ffbc7d1170d9105c0769c4d v7-3-766 be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767 9ea81cd9b1f50054629547ce2eccfac1fa00d096 v7-3-768 d179a8eff9d7b0adc561f4a4dcfb0b7612c1f301 v7-3-769 +da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770 From f53cfcc3f81a4d92ef957502593a4184c6f9d398 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 17:37:35 +0100 Subject: [PATCH 033/106] updated for version 7.3.771 Problem: Uninitialized variable. (Yasuhiro Matsumoto) Solution: Set x2 to -1. --- src/option.c | 6 +++--- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/option.c b/src/option.c index 8f52406022..f38e9c7066 100644 --- a/src/option.c +++ b/src/option.c @@ -6154,7 +6154,8 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf, { for (p = *varp; *p != NUL; ++p) { - int x2,x3 = -1; + int x2 = -1; + int x3 = -1; if (*p != NUL) p += mb_ptr2len(p); @@ -6165,8 +6166,7 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf, x3 = mb_ptr2char(p); p += mb_ptr2len(p); } - if (x2 != ':' || x2 == -1 || x3 == -1 - || (*p != NUL && *p != ',')) + if (x2 != ':' || x3 == -1 || (*p != NUL && *p != ',')) { errmsg = e_invarg; break; diff --git a/src/version.c b/src/version.c index 18fcd020f0..f071eb9621 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 771, /**/ 770, /**/ From cf2c91556661f2e0182c4e978f7accff8cf818eb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 17:37:36 +0100 Subject: [PATCH 034/106] Added tag v7-3-771 for changeset 3bd2c055319e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 16db06c1a1..f1351d4996 100644 --- a/.hgtags +++ b/.hgtags @@ -2107,3 +2107,4 @@ be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767 9ea81cd9b1f50054629547ce2eccfac1fa00d096 v7-3-768 d179a8eff9d7b0adc561f4a4dcfb0b7612c1f301 v7-3-769 da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770 +3bd2c055319e086665af5e449498a4d5bf40f25e v7-3-771 From 31b7236cd892eac3bd8202c9868cd353302e6645 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 18:34:05 +0100 Subject: [PATCH 035/106] updated for version 7.3.772 Problem: Cursor is at the wrong location and below the end of the file after doing substitutions with confirm flag: %s/x/y/c (Dominique Pelle) Solution: Update the cursor position. (Christian Brabandt & Dominique) --- src/ex_cmds.c | 6 ++++++ src/version.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 712ba4ff9d..acb4da28dd 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5200,6 +5200,12 @@ outofmem: EMSG2(_(e_patnotf2), get_search_pat()); } +#ifdef FEAT_FOLDING + if (do_ask && hasAnyFolding(curwin)) + /* Cursor position may require updating */ + changed_window_setting(); +#endif + vim_free(regmatch.regprog); } diff --git a/src/version.c b/src/version.c index f071eb9621..8b9a2414b1 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 772, /**/ 771, /**/ From b55f9b11ea9acdc6f1d7a05a4eb2aba0c9325e59 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 17 Jan 2013 18:34:06 +0100 Subject: [PATCH 036/106] Added tag v7-3-772 for changeset d828cab6964f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f1351d4996..3a2bda18f0 100644 --- a/.hgtags +++ b/.hgtags @@ -2108,3 +2108,4 @@ be1cffa1e477c4a96bb54a3097d3369b23f32825 v7-3-767 d179a8eff9d7b0adc561f4a4dcfb0b7612c1f301 v7-3-769 da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770 3bd2c055319e086665af5e449498a4d5bf40f25e v7-3-771 +d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772 From 1c19bd8cbcfae84713c0fb282d686c55d2bf2c03 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 19 Jan 2013 14:02:02 +0100 Subject: [PATCH 037/106] updated for version 7.3.773 Problem: Crash when OriginalFirstThunk is zero. Solution: Skip items with OriginalFirstThunk not set. (Ken Takata) --- src/mbyte.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/mbyte.c b/src/mbyte.c index 5f82edf8d6..7fdd44dc32 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -4317,6 +4317,8 @@ get_iconv_import_func(HINSTANCE hInst, const char *funcname) .VirtualAddress); for (; pImpDesc->FirstThunk; ++pImpDesc) { + if (!pImpDesc->OriginalFirstThunk) + continue; pIAT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->FirstThunk); pINT = (PIMAGE_THUNK_DATA)(pImage + pImpDesc->OriginalFirstThunk); for (; pIAT->u1.Function; ++pIAT, ++pINT) diff --git a/src/version.c b/src/version.c index 8b9a2414b1..b3e1c2903a 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 773, /**/ 772, /**/ From 0e601a6548a67576102b289223028a107fd38289 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 19 Jan 2013 14:02:02 +0100 Subject: [PATCH 038/106] Added tag v7-3-773 for changeset 3db9aee957f7 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 3a2bda18f0..0dd7c2c25b 100644 --- a/.hgtags +++ b/.hgtags @@ -2109,3 +2109,4 @@ d179a8eff9d7b0adc561f4a4dcfb0b7612c1f301 v7-3-769 da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770 3bd2c055319e086665af5e449498a4d5bf40f25e v7-3-771 d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772 +3db9aee957f7eea6729e5bfd294e3a24d41c79e4 v7-3-773 From 8eba316a0785dcf95299791c75b005895e1a256f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 13:41:00 +0100 Subject: [PATCH 039/106] updated for version 7.3.774 Problem: Tiny GUI version misses console dialog feature. Solution: Define FEAT_CON_DIALOG when apprpriate. (Christian Brabandt) --- src/feature.h | 12 ++++++++++++ src/gui.h | 9 --------- src/version.c | 2 ++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/feature.h b/src/feature.h index 7ef654bb39..f54f59ac9f 100644 --- a/src/feature.h +++ b/src/feature.h @@ -791,6 +791,15 @@ # endif #endif +/* + * On some systems, when we compile with the GUI, we always use it. On Mac + * there is no terminal version, and on Windows we can't figure out how to + * fork one off with :gui. + */ +#if defined(FEAT_GUI_MSWIN) || (defined(FEAT_GUI_MAC) && !defined(MACOS_X_UNIX)) +# define ALWAYS_USE_GUI +#endif + /* * +dialog_gui Use GUI dialog. * +dialog_con May use Console dialog. @@ -820,6 +829,9 @@ || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC)) # define FEAT_GUI_TEXTDIALOG +# ifndef ALWAYS_USE_GUI +# define FEAT_CON_DIALOG +# endif #endif /* Mac specific thing: Codewarrior interface. */ diff --git a/src/gui.h b/src/gui.h index e0c1c5c8aa..aea450a196 100644 --- a/src/gui.h +++ b/src/gui.h @@ -58,15 +58,6 @@ # include "photon/PxProto.h" #endif -/* - * On some systems, when we compile with the GUI, we always use it. On Mac - * there is no terminal version, and on Windows we can't figure out how to - * fork one off with :gui. - */ -#if defined(FEAT_GUI_MSWIN) || (defined(FEAT_GUI_MAC) && !defined(MACOS_X_UNIX)) -# define ALWAYS_USE_GUI -#endif - /* * On some systems scrolling needs to be done right away instead of in the * main loop. diff --git a/src/version.c b/src/version.c index b3e1c2903a..0190457066 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 774, /**/ 773, /**/ From 642b9e5b2ebff017a8ba232e37b16015c0a50378 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 13:41:01 +0100 Subject: [PATCH 040/106] Added tag v7-3-774 for changeset a8f5876e4981 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0dd7c2c25b..a443373ca1 100644 --- a/.hgtags +++ b/.hgtags @@ -2110,3 +2110,4 @@ da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770 3bd2c055319e086665af5e449498a4d5bf40f25e v7-3-771 d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772 3db9aee957f7eea6729e5bfd294e3a24d41c79e4 v7-3-773 +a8f5876e498125f4916c5f7168823885c27dad8c v7-3-774 From b0b542fa2a036f71dc79f9e564ff685f5a79831b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 13:55:20 +0100 Subject: [PATCH 041/106] updated for version 7.3.775 Problem: Cygwin and Mingw builds miss dependency on gui_w48.c. Solution: Add a build rule. (Ken Takata) --- src/Make_cyg.mak | 3 +++ src/Make_ming.mak | 3 +++ src/version.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak index a56141662f..087b68e481 100644 --- a/src/Make_cyg.mak +++ b/src/Make_cyg.mak @@ -600,6 +600,9 @@ $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h $(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o +$(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL) + $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o + $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o diff --git a/src/Make_ming.mak b/src/Make_ming.mak index 9402ccce7a..b11db8b93a 100644 --- a/src/Make_ming.mak +++ b/src/Make_ming.mak @@ -731,6 +731,9 @@ $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h $(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o +$(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL) + $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o + $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o diff --git a/src/version.c b/src/version.c index 0190457066..725506e33c 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 775, /**/ 774, /**/ From 7e896accbc9ea5458296827ca32dc643b2361f29 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 13:55:20 +0100 Subject: [PATCH 042/106] Added tag v7-3-775 for changeset a6e60677aea7 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a443373ca1..b732ad5cce 100644 --- a/.hgtags +++ b/.hgtags @@ -2111,3 +2111,4 @@ da7a7ba36ed2a51f28e4d3f7e1fd550303e3ece8 v7-3-770 d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772 3db9aee957f7eea6729e5bfd294e3a24d41c79e4 v7-3-773 a8f5876e498125f4916c5f7168823885c27dad8c v7-3-774 +a6e60677aea727622dde15d1306c61588b805500 v7-3-775 From fed6561294751b33c7f860817a9cc45060c8395c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 15:53:15 +0100 Subject: [PATCH 043/106] updated for version 7.3.776 Problem: ml_get error when searching, caused by curwin not matching curbuf. Solution: Avoid changing curbuf. (Lech Lorens) --- src/charset.c | 12 ++++++++++-- src/eval.c | 2 +- src/mark.c | 36 +++++++++++++++++++++++------------- src/proto/charset.pro | 3 ++- src/proto/mark.pro | 3 ++- src/regexp.c | 14 +++++--------- src/syntax.c | 6 +++--- src/version.c | 2 ++ 8 files changed, 48 insertions(+), 30 deletions(-) diff --git a/src/charset.c b/src/charset.c index d3ebfbf765..6f39cf6d07 100644 --- a/src/charset.c +++ b/src/charset.c @@ -904,6 +904,14 @@ vim_isIDc(c) int vim_iswordc(c) int c; +{ + return vim_iswordc_buf(c, curbuf); +} + + int +vim_iswordc_buf(c, buf) + int c; + buf_T *buf; { #ifdef FEAT_MBYTE if (c >= 0x100) @@ -914,7 +922,7 @@ vim_iswordc(c) return utf_class(c) >= 2; } #endif - return (c > 0 && c < 0x100 && GET_CHARTAB(curbuf, c) != 0); + return (c > 0 && c < 0x100 && GET_CHARTAB(buf, c) != 0); } /* @@ -933,7 +941,7 @@ vim_iswordp(p) #if defined(FEAT_SYN_HL) || defined(PROTO) int -vim_iswordc_buf(p, buf) +vim_iswordp_buf(p, buf) char_u *p; buf_T *buf; { diff --git a/src/eval.c b/src/eval.c index 7c57557654..f645e9683e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -18884,7 +18884,7 @@ var2fpos(varp, dollar_lnum, fnum) #endif if (name[0] == '\'') /* mark */ { - pp = getmark_fnum(name[1], FALSE, fnum); + pp = getmark_buf_fnum(curbuf, name[1], FALSE, fnum); if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0) return NULL; return pp; diff --git a/src/mark.c b/src/mark.c index 9b304f3d38..540f70b97b 100644 --- a/src/mark.c +++ b/src/mark.c @@ -304,7 +304,7 @@ movechangelist(count) #endif /* - * Find mark "c". + * Find mark "c" in buffer pointed to by "buf". * If "changefile" is TRUE it's allowed to edit another file for '0, 'A, etc. * If "fnum" is not NULL store the fnum there for '0, 'A etc., don't edit * another file. @@ -314,16 +314,26 @@ movechangelist(count) * - NULL if there is no mark called 'c'. * - -1 if mark is in other file and jumped there (only if changefile is TRUE) */ + pos_T * +getmark_buf(buf, c, changefile) + buf_T *buf; + int c; + int changefile; +{ + return getmark_buf_fnum(buf, c, changefile, NULL); +} + pos_T * getmark(c, changefile) int c; int changefile; { - return getmark_fnum(c, changefile, NULL); + return getmark_buf_fnum(curbuf, c, changefile, NULL); } pos_T * -getmark_fnum(c, changefile, fnum) +getmark_buf_fnum(buf, c, changefile, fnum) + buf_T *buf; int c; int changefile; int *fnum; @@ -351,15 +361,15 @@ getmark_fnum(c, changefile, fnum) posp = &pos_copy; /* w_pcmark may be changed soon */ } else if (c == '"') /* to pos when leaving buffer */ - posp = &(curbuf->b_last_cursor); + posp = &(buf->b_last_cursor); else if (c == '^') /* to where Insert mode stopped */ - posp = &(curbuf->b_last_insert); + posp = &(buf->b_last_insert); else if (c == '.') /* to where last change was made */ - posp = &(curbuf->b_last_change); + posp = &(buf->b_last_change); else if (c == '[') /* to start of previous operator */ - posp = &(curbuf->b_op_start); + posp = &(buf->b_op_start); else if (c == ']') /* to end of previous operator */ - posp = &(curbuf->b_op_end); + posp = &(buf->b_op_end); else if (c == '{' || c == '}') /* to previous/next paragraph */ { pos_T pos; @@ -395,8 +405,8 @@ getmark_fnum(c, changefile, fnum) #ifdef FEAT_VISUAL else if (c == '<' || c == '>') /* start/end of visual area */ { - startp = &curbuf->b_visual.vi_start; - endp = &curbuf->b_visual.vi_end; + startp = &buf->b_visual.vi_start; + endp = &buf->b_visual.vi_end; if ((c == '<') == lt(*startp, *endp)) posp = startp; else @@ -404,7 +414,7 @@ getmark_fnum(c, changefile, fnum) /* * For Visual line mode, set mark at begin or end of line */ - if (curbuf->b_visual.vi_mode == 'V') + if (buf->b_visual.vi_mode == 'V') { pos_copy = *posp; posp = &pos_copy; @@ -420,7 +430,7 @@ getmark_fnum(c, changefile, fnum) #endif else if (ASCII_ISLOWER(c)) /* normal named mark */ { - posp = &(curbuf->b_namedm[c - 'a']); + posp = &(buf->b_namedm[c - 'a']); } else if (ASCII_ISUPPER(c) || VIM_ISDIGIT(c)) /* named file mark */ { @@ -435,7 +445,7 @@ getmark_fnum(c, changefile, fnum) if (fnum != NULL) *fnum = namedfm[c].fmark.fnum; - else if (namedfm[c].fmark.fnum != curbuf->b_fnum) + else if (namedfm[c].fmark.fnum != buf->b_fnum) { /* mark is in another file */ posp = &pos_copy; diff --git a/src/proto/charset.pro b/src/proto/charset.pro index 472f1cd44e..72eed4b071 100644 --- a/src/proto/charset.pro +++ b/src/proto/charset.pro @@ -19,8 +19,9 @@ int linetabsize_col __ARGS((int startcol, char_u *s)); int win_linetabsize __ARGS((win_T *wp, char_u *p, colnr_T len)); int vim_isIDc __ARGS((int c)); int vim_iswordc __ARGS((int c)); +int vim_iswordc_buf __ARGS((int c, buf_T *buf)); int vim_iswordp __ARGS((char_u *p)); -int vim_iswordc_buf __ARGS((char_u *p, buf_T *buf)); +int vim_iswordp_buf __ARGS((char_u *p, buf_T *buf)); int vim_isfilec __ARGS((int c)); int vim_isfilec_or_wc __ARGS((int c)); int vim_isprintc __ARGS((int c)); diff --git a/src/proto/mark.pro b/src/proto/mark.pro index 1457829a74..e8cef9dd26 100644 --- a/src/proto/mark.pro +++ b/src/proto/mark.pro @@ -5,8 +5,9 @@ void setpcmark __ARGS((void)); void checkpcmark __ARGS((void)); pos_T *movemark __ARGS((int count)); pos_T *movechangelist __ARGS((int count)); +pos_T *getmark_buf __ARGS((buf_T *buf, int c, int changefile)); pos_T *getmark __ARGS((int c, int changefile)); -pos_T *getmark_fnum __ARGS((int c, int changefile, int *fnum)); +pos_T *getmark_buf_fnum __ARGS((buf_T *buf, int c, int changefile, int *fnum)); pos_T *getnextmark __ARGS((pos_T *startpos, int dir, int begin_line)); void fmarks_check_names __ARGS((buf_T *buf)); int check_mark __ARGS((pos_T *pos)); diff --git a/src/regexp.c b/src/regexp.c index b078de385b..bb63c942f0 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -3623,7 +3623,6 @@ vim_regexec_multi(rmp, win, buf, lnum, col, tm) proftime_T *tm; /* timeout limit or NULL */ { long r; - buf_T *save_curbuf = curbuf; reg_match = NULL; reg_mmatch = rmp; @@ -3638,10 +3637,7 @@ vim_regexec_multi(rmp, win, buf, lnum, col, tm) #endif ireg_maxcol = rmp->rmm_maxcol; - /* Need to switch to buffer "buf" to make vim_iswordc() work. */ - curbuf = buf; r = vim_regexec_both(NULL, col, tm); - curbuf = save_curbuf; return r; } @@ -4185,7 +4181,7 @@ regmatch(scan) int cmp = OPERAND(scan)[1]; pos_T *pos; - pos = getmark(mark, FALSE); + pos = getmark_buf(reg_buf, mark, FALSE); if (pos == NULL /* mark doesn't exist */ || pos->lnum <= 0 /* mark isn't set (in curbuf) */ || (pos->lnum == reglnum + reg_firstlnum @@ -4315,8 +4311,8 @@ regmatch(scan) #endif else { - if (!vim_iswordc(c) - || (reginput > regline && vim_iswordc(reginput[-1]))) + if (!vim_iswordc_buf(c, reg_buf) + || (reginput > regline && vim_iswordc_buf(reginput[-1], reg_buf))) status = RA_NOMATCH; } break; @@ -4339,8 +4335,8 @@ regmatch(scan) #endif else { - if (!vim_iswordc(reginput[-1]) - || (reginput[0] != NUL && vim_iswordc(c))) + if (!vim_iswordc_buf(reginput[-1], reg_buf) + || (reginput[0] != NUL && vim_iswordc_buf(c, reg_buf))) status = RA_NOMATCH; } break; /* Matched with EOW */ diff --git a/src/syntax.c b/src/syntax.c index 4adbaf087b..8e2930cf50 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1954,9 +1954,9 @@ syn_current_attr(syncing, displaying, can_spell, keep_state) if (do_keywords) { line = syn_getcurline(); - if (vim_iswordc_buf(line + current_col, syn_buf) + if (vim_iswordp_buf(line + current_col, syn_buf) && (current_col == 0 - || !vim_iswordc_buf(line + current_col - 1 + || !vim_iswordp_buf(line + current_col - 1 #ifdef FEAT_MBYTE - (has_mbyte ? (*mb_head_off)(line, line + current_col - 1) @@ -3280,7 +3280,7 @@ check_keyword_id(line, startcol, endcolp, flagsp, next_listp, cur_si, ccharp) #endif ++kwlen; } - while (vim_iswordc_buf(kwp + kwlen, syn_buf)); + while (vim_iswordp_buf(kwp + kwlen, syn_buf)); if (kwlen > MAXKEYWLEN) return 0; diff --git a/src/version.c b/src/version.c index 725506e33c..03a4833146 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 776, /**/ 775, /**/ From 8efba88984f1fce93573dce416d0b6dc51686b0d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 15:53:15 +0100 Subject: [PATCH 044/106] Added tag v7-3-776 for changeset 80b041b994d1 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b732ad5cce..7f57609663 100644 --- a/.hgtags +++ b/.hgtags @@ -2112,3 +2112,4 @@ d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772 3db9aee957f7eea6729e5bfd294e3a24d41c79e4 v7-3-773 a8f5876e498125f4916c5f7168823885c27dad8c v7-3-774 a6e60677aea727622dde15d1306c61588b805500 v7-3-775 +80b041b994d156360992666110964e74f7473d3e v7-3-776 From e429f1d34ad0f330a25d8dbea6dab9f834435b74 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 16:00:11 +0100 Subject: [PATCH 045/106] updated for version 7.3.777 Problem: When building with Gnome locale gets reset. Solution: Set locale after gnome_program_init(). (Christian Brabandt) --- src/gui_gtk_x11.c | 8 ++++++++ src/version.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index d70f418603..a8cad32e19 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -3130,8 +3130,16 @@ gui_mch_init(void) * exits on failure, but that's a non-issue because we already called * gtk_init_check() in gui_mch_init_check(). */ if (using_gnome) + { gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT, LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL); +# if defined(FEAT_FLOAT) && defined(LC_NUMERIC) + /* Make sure strtod() uses a decimal point, not a comma. Gnome init + * may change it. */ + if (setlocale(LC_NUMERIC, NULL) != (char *) "C") + setlocale(LC_NUMERIC, "C"); +# endif + } #endif vim_free(gui_argv); gui_argv = NULL; diff --git a/src/version.c b/src/version.c index 03a4833146..3e7d4639ee 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 777, /**/ 776, /**/ From ae4a8a157a7e83f14cbc36d3ad74752905aff222 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 16:00:11 +0100 Subject: [PATCH 046/106] Added tag v7-3-777 for changeset 9a1a4c486e6b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7f57609663..621ed2f52f 100644 --- a/.hgtags +++ b/.hgtags @@ -2113,3 +2113,4 @@ d828cab6964f4249db54bff6df0fe02d0f290387 v7-3-772 a8f5876e498125f4916c5f7168823885c27dad8c v7-3-774 a6e60677aea727622dde15d1306c61588b805500 v7-3-775 80b041b994d156360992666110964e74f7473d3e v7-3-776 +9a1a4c486e6bb367c639c29c6120d5fb1fadcc38 v7-3-777 From 790813992c12469657a3d728420bea8e6af566b4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 16:19:23 +0100 Subject: [PATCH 047/106] updated for version 7.3.778 Problem: Compiler error for adding up two pointers. (Titov Anatoly) Solution: Add a type cast. (Ken Takata) --- src/mbyte.c | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mbyte.c b/src/mbyte.c index 7fdd44dc32..b896477fce 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -4325,7 +4325,8 @@ get_iconv_import_func(HINSTANCE hInst, const char *funcname) { if (IMAGE_SNAP_BY_ORDINAL(pINT->u1.Ordinal)) continue; - pImpName = (PIMAGE_IMPORT_BY_NAME)(pImage + pINT->u1.AddressOfData); + pImpName = (PIMAGE_IMPORT_BY_NAME)(pImage + + (UINT_PTR)(pINT->u1.AddressOfData)); if (strcmp(pImpName->Name, funcname) == 0) return (void *)pIAT->u1.Function; } diff --git a/src/version.c b/src/version.c index 3e7d4639ee..073c294edd 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 778, /**/ 777, /**/ From fe856f855b14b8a051dde847c6d583e79f48992f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 16:19:23 +0100 Subject: [PATCH 048/106] Added tag v7-3-778 for changeset 562bbee33aa4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 621ed2f52f..f8c12e9517 100644 --- a/.hgtags +++ b/.hgtags @@ -2114,3 +2114,4 @@ a8f5876e498125f4916c5f7168823885c27dad8c v7-3-774 a6e60677aea727622dde15d1306c61588b805500 v7-3-775 80b041b994d156360992666110964e74f7473d3e v7-3-776 9a1a4c486e6bb367c639c29c6120d5fb1fadcc38 v7-3-777 +562bbee33aa4f9896cb23ed6de8fbf60cac323e0 v7-3-778 From 41c76ce8eec219c12b0f7927903c068ee7600ccf Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 16:43:11 +0100 Subject: [PATCH 049/106] updated for version 7.3.779 Problem: Backwards search lands in wrong place when started on a multibyte character. Solution: Do not set extra_col for a backwards search. (Sung Pae) --- src/search.c | 3 ++- src/testdir/test44.in | 4 ++++ src/testdir/test44.ok | 1 + src/version.c | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index 0b1c519fb2..24b0c4a82e 100644 --- a/src/search.c +++ b/src/search.c @@ -572,7 +572,8 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use, stop_lnum, tm) extra_col = 0; #ifdef FEAT_MBYTE /* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */ - else if (has_mbyte && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count + else if (dir != BACKWARD && has_mbyte + && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count && pos->col < MAXCOL - 2) { ptr = ml_get_buf(buf, pos->lnum, FALSE) + pos->col; diff --git a/src/testdir/test44.in b/src/testdir/test44.in index b8b8d4fb21..e4868697d6 100644 --- a/src/testdir/test44.in +++ b/src/testdir/test44.in @@ -29,6 +29,9 @@ x/[\U1234abcd\u1234\uabcd] x/\%d21879b x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e +x:" Test backwards search from a multi-byte char +/x +x?. x:?^1?,$w! test.out :e! test.out G:put =matchstr(\"אבגד\", \".\", 0, 2) " ב @@ -57,3 +60,4 @@ f g a啷bb h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐẔ i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑẕ +j 0123❤x diff --git a/src/testdir/test44.ok b/src/testdir/test44.ok index 2bd5bdad8b..d98ac2ef5d 100644 --- a/src/testdir/test44.ok +++ b/src/testdir/test44.ok @@ -16,6 +16,7 @@ f z g abb h AÀÁÂÃÄÅĀĂĄǍǞǠẢ BḂḆ CÇĆĈĊČ DĎĐḊḎḐ EÈÉÊËĒĔĖĘĚẺẼ FḞ GĜĞĠĢǤǦǴḠ HĤĦḢḦḨ IÌÍÎÏĨĪĬĮİǏỈ JĴ KĶǨḰḴ LĹĻĽĿŁḺ MḾṀ NÑŃŅŇṄṈ OÒÓÔÕÖØŌŎŐƠǑǪǬỎ PṔṖ Q RŔŖŘṘṞ SŚŜŞŠṠ TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ VṼ WŴẀẂẄẆ XẊẌ YÝŶŸẎỲỶỸ ZŹŻŽƵẐ i aàáâãäåāăąǎǟǡả bḃḇ cçćĉċč dďđḋḏḑ eèéêëēĕėęěẻẽ fḟ gĝğġģǥǧǵḡ hĥħḣḧḩẖ iìíîïĩīĭįǐỉ jĵǰ kķǩḱḵ lĺļľŀłḻ mḿṁ nñńņňʼnṅṉ oòóôõöøōŏőơǒǫǭỏ pṕṗ q rŕŗřṙṟ sśŝşšṡ tţťŧṫṯẗ uùúûüũūŭůűųưǔủ vṽ wŵẁẃẅẇẘ xẋẍ yýÿŷẏẙỳỷỹ zźżžƶẑ +j 012❤ ב בג א diff --git a/src/version.c b/src/version.c index 073c294edd..a8cfdc567e 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 779, /**/ 778, /**/ From e279ab259c942488a3f71897f35b03f12bb5f678 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 16:43:12 +0100 Subject: [PATCH 050/106] Added tag v7-3-779 for changeset 2067ed78d37c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index f8c12e9517..d5def8b056 100644 --- a/.hgtags +++ b/.hgtags @@ -2115,3 +2115,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 80b041b994d156360992666110964e74f7473d3e v7-3-776 9a1a4c486e6bb367c639c29c6120d5fb1fadcc38 v7-3-777 562bbee33aa4f9896cb23ed6de8fbf60cac323e0 v7-3-778 +2067ed78d37c331685ef8f293d6a23c372ca4b78 v7-3-779 From 7550cba718559b0d9d261782d9e2e25791a5c894 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 17:17:10 +0100 Subject: [PATCH 051/106] updated for version 7.3.780 Problem: char2nr() and nr2char() always use 'encoding'. Solution: Add argument to use utf-8 characters. (Yasuhiro Matsumoto) --- runtime/doc/eval.txt | 20 ++++++++++++-------- src/eval.c | 27 +++++++++++++++++++++++---- src/version.c | 2 ++ 3 files changed, 37 insertions(+), 12 deletions(-) diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 6057d61a38..7594ea9805 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1716,7 +1716,7 @@ call( {func}, {arglist} [, {dict}]) any call {func} with arguments {arglist} ceil( {expr}) Float round {expr} up changenr() Number current change number -char2nr( {expr}) Number ASCII value of first char in {expr} +char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr} cindent( {lnum}) Number C indent for line {lnum} clearmatches() none clear all matches col( {expr}) Number column nr of cursor or mark @@ -1873,7 +1873,7 @@ mkdir( {name} [, {path} [, {prot}]]) mode( [expr]) String current editing mode mzeval( {expr}) any evaluate |MzScheme| expression nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} -nr2char( {expr}) String single char with ASCII value {expr} +nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr} or( {expr}, {expr}) Number bitwise OR pathshorten( {expr}) String shorten directory names in a path pow( {x}, {y}) Float {x} to the power of {y} @@ -2294,14 +2294,16 @@ changenr() *changenr()* redo it is the number of the redone change. After undo it is one less than the number of the undone change. -char2nr({expr}) *char2nr()* +char2nr({expr}[, {utf8}]) *char2nr()* Return number value of the first char in {expr}. Examples: > char2nr(" ") returns 32 char2nr("ABC") returns 65 -< The current 'encoding' is used. Example for "utf-8": > +< When {utf8} is omitted or zero, the current 'encoding' is used. + Example for "utf-8": > char2nr("") returns 225 char2nr(""[0]) returns 195 -< A combining character is a separate character. +< With {utf8} set to 1, always treat as utf-8 characters. + A combining character is a separate character. |nr2char()| does the opposite. cindent({lnum}) *cindent()* @@ -4371,14 +4373,16 @@ nextnonblank({lnum}) *nextnonblank()* below it, zero is returned. See also |prevnonblank()|. -nr2char({expr}) *nr2char()* +nr2char({expr}[, {utf8}]) *nr2char()* Return a string with a single character, which has the number value {expr}. Examples: > nr2char(64) returns "@" nr2char(32) returns " " -< The current 'encoding' is used. Example for "utf-8": > +< When {utf8} is omitted or zero, the current 'encoding' is used. + Example for "utf-8": > nr2char(300) returns I with bow character -< Note that a NUL character in the file is specified with +< With {utf8} set to 1, always return utf-8 characters. + Note that a NUL character in the file is specified with nr2char(10), because NULs are represented with newline characters. nr2char(0) is a real NUL and terminates the string, thus results in an empty string. diff --git a/src/eval.c b/src/eval.c index f645e9683e..46a1963de9 100644 --- a/src/eval.c +++ b/src/eval.c @@ -7854,7 +7854,7 @@ static struct fst {"ceil", 1, 1, f_ceil}, #endif {"changenr", 0, 0, f_changenr}, - {"char2nr", 1, 1, f_char2nr}, + {"char2nr", 1, 2, f_char2nr}, {"cindent", 1, 1, f_cindent}, {"clearmatches", 0, 0, f_clearmatches}, {"col", 1, 1, f_col}, @@ -8003,7 +8003,7 @@ static struct fst {"mzeval", 1, 1, f_mzeval}, #endif {"nextnonblank", 1, 1, f_nextnonblank}, - {"nr2char", 1, 1, f_nr2char}, + {"nr2char", 1, 2, f_nr2char}, {"or", 2, 2, f_or}, {"pathshorten", 1, 1, f_pathshorten}, #ifdef FEAT_FLOAT @@ -9303,7 +9303,17 @@ f_char2nr(argvars, rettv) { #ifdef FEAT_MBYTE if (has_mbyte) - rettv->vval.v_number = (*mb_ptr2char)(get_tv_string(&argvars[0])); + { + int utf8 = 0; + + if (argvars[1].v_type != VAR_UNKNOWN) + utf8 = get_tv_number_chk(&argvars[1], NULL); + + if (utf8) + rettv->vval.v_number = (*utf_ptr2char)(get_tv_string(&argvars[0])); + else + rettv->vval.v_number = (*mb_ptr2char)(get_tv_string(&argvars[0])); + } else #endif rettv->vval.v_number = get_tv_string(&argvars[0])[0]; @@ -14360,7 +14370,16 @@ f_nr2char(argvars, rettv) #ifdef FEAT_MBYTE if (has_mbyte) - buf[(*mb_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL; + { + int utf8 = 0; + + if (argvars[1].v_type != VAR_UNKNOWN) + utf8 = get_tv_number_chk(&argvars[1], NULL); + if (utf8) + buf[(*utf_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL; + else + buf[(*mb_char2bytes)((int)get_tv_number(&argvars[0]), buf)] = NUL; + } else #endif { diff --git a/src/version.c b/src/version.c index a8cfdc567e..72b552ae56 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 780, /**/ 779, /**/ From 28740349ace6672a36f300bafeba875c4afc2127 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 17:17:11 +0100 Subject: [PATCH 052/106] Added tag v7-3-780 for changeset 42edc5dac33c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d5def8b056..21d3cb8666 100644 --- a/.hgtags +++ b/.hgtags @@ -2116,3 +2116,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 9a1a4c486e6bb367c639c29c6120d5fb1fadcc38 v7-3-777 562bbee33aa4f9896cb23ed6de8fbf60cac323e0 v7-3-778 2067ed78d37c331685ef8f293d6a23c372ca4b78 v7-3-779 +42edc5dac33c92876d93f00f8ab8c1f6bb25d3fc v7-3-780 From e0261d18dea01feed30ecad74c84951d4c278ea2 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 17:43:57 +0100 Subject: [PATCH 053/106] updated for version 7.3.781 Problem: Drawing with 'guifontwide' can be slow. Solution: Draw multiple characters at a time. (Taro Muraoka) --- src/gui.c | 34 +++++++++++++++++++++------------- src/version.c | 2 ++ 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/gui.c b/src/gui.c index 55e841f32c..14706553a0 100644 --- a/src/gui.c +++ b/src/gui.c @@ -2380,7 +2380,9 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) int cl; /* byte length of current char */ int comping; /* current char is composing */ int scol = col; /* screen column */ - int dowide; /* use 'guifontwide' */ + int curr_wide; /* use 'guifontwide' */ + int prev_wide = FALSE; + int wide_changed; /* Break the string at a composing character, it has to be drawn on * top of the previous character. */ @@ -2395,9 +2397,9 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) && fontset == NOFONTSET # endif && gui.wide_font != NOFONT) - dowide = TRUE; + curr_wide = TRUE; else - dowide = FALSE; + curr_wide = FALSE; comping = utf_iscomposing(c); if (!comping) /* count cells from non-composing chars */ cells += cn; @@ -2405,9 +2407,11 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) if (cl == 0) /* hit end of string */ len = i + cl; /* len must be wrong "cannot happen" */ - /* print the string so far if it's the last character or there is + wide_changed = curr_wide != prev_wide; + + /* Print the string so far if it's the last character or there is * a composing character. */ - if (i + cl >= len || (comping && i > start) || dowide + if (i + cl >= len || (comping && i > start) || wide_changed # if defined(FEAT_GUI_X11) || (cn > 1 # ifdef FEAT_XFONTSET @@ -2419,25 +2423,28 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) # endif ) { - if (comping || dowide) + if (comping || wide_changed) thislen = i - start; else thislen = i - start + cl; if (thislen > 0) { + if (prev_wide) + gui_mch_set_font(gui.wide_font); gui_mch_draw_string(gui.row, scol, s + start, thislen, draw_flags); + if (prev_wide) + gui_mch_set_font(font); start += thislen; } scol += cells; cells = 0; - if (dowide) + /* Adjust to not draw a character which width is changed + * against with last one. */ + if (wide_changed && !comping) { - gui_mch_set_font(gui.wide_font); - gui_mch_draw_string(gui.row, scol - cn, - s + start, cl, draw_flags); - gui_mch_set_font(font); - start += cl; + scol -= cn; + cl = 0; } # if defined(FEAT_GUI_X11) @@ -2447,7 +2454,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) # ifdef FEAT_XFONTSET && fontset == NOFONTSET # endif - && !dowide) + && !wide_changed) gui_mch_draw_string(gui.row, scol - 1, (char_u *)" ", 1, draw_flags); # endif @@ -2465,6 +2472,7 @@ gui_outstr_nowrap(s, len, flags, fg, bg, back) # endif start = i + cl; } + prev_wide = curr_wide; } /* The stuff below assumes "len" is the length in screen columns. */ len = scol - col; diff --git a/src/version.c b/src/version.c index 72b552ae56..a3351c3d0d 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 781, /**/ 780, /**/ From 87feee50da25fd23301ba9343734e99a4de33712 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 17:43:57 +0100 Subject: [PATCH 054/106] Added tag v7-3-781 for changeset 29f29e86602e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 21d3cb8666..47d7cff969 100644 --- a/.hgtags +++ b/.hgtags @@ -2117,3 +2117,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 562bbee33aa4f9896cb23ed6de8fbf60cac323e0 v7-3-778 2067ed78d37c331685ef8f293d6a23c372ca4b78 v7-3-779 42edc5dac33c92876d93f00f8ab8c1f6bb25d3fc v7-3-780 +29f29e86602e4a7f83d4572d2fe75b9b0de2752f v7-3-781 From 39d7e0945cf35aecd5dd3058430d28e45bc87227 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 18:37:40 +0100 Subject: [PATCH 055/106] updated for version 7.3.782 Problem: Windows: IME composition may use a wrong font. Solution: Use 'guifontwide' for IME when it is set. (Taro Muraoka) --- runtime/doc/options.txt | 4 ++++ src/gui.c | 3 +++ src/gui_w48.c | 41 ++++++++++++++++++++++++++++++++++++++++- src/proto/gui_w16.pro | 1 + src/proto/gui_w32.pro | 1 + src/version.c | 2 ++ 6 files changed, 51 insertions(+), 1 deletion(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index a439234987..c3cc0871c4 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3560,6 +3560,10 @@ A jump table for the options with a short description can be found at |Q_op|. to set 'guifontwide' at all unless you want to override the choice made by Pango/Xft. + Windows +multibyte only: *guifontwide_win_mbyte* + + If set and vaild, 'guifontwide' is used for IME instead of 'guifont'. + *'guiheadroom'* *'ghr'* 'guiheadroom' 'ghr' number (default 50) global diff --git a/src/gui.c b/src/gui.c index 14706553a0..6e5d58b5c6 100644 --- a/src/gui.c +++ b/src/gui.c @@ -1002,6 +1002,9 @@ gui_get_wide_font() else #endif gui.wide_font = font; +#ifdef FEAT_GUI_MSWIN + gui_mch_wide_font_changed(); +#endif return OK; } #endif diff --git a/src/gui_w48.c b/src/gui_w48.c index 1d380fbf93..0a7f367e87 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -323,10 +323,15 @@ static void TrackUserActivity __ARGS((UINT uMsg)); /* * For control IME. + * + * These LOGFONT used for IME. */ #ifdef FEAT_MBYTE # ifdef USE_IM_CONTROL +/* holds LOGFONT for 'guifontwide' if available, otherwise 'guifont' */ static LOGFONT norm_logfont; +/* holds LOGFONT for 'guifont' always. */ +static LOGFONT sub_logfont; # endif #endif @@ -3090,6 +3095,39 @@ logfont2name(LOGFONT lf) return res; } + +#ifdef FEAT_MBYTE_IME +/* + * Set correct LOGFONT to IME. Use 'guifontwide' if available, otherwise use + * 'guifont' + */ + static void +update_im_font() +{ + LOGFONT lf_wide; + + if (p_guifontwide != NULL && *p_guifontwide != NUL + && get_logfont(&lf_wide, p_guifontwide, NULL, TRUE) == OK) + norm_logfont = lf_wide; + else + norm_logfont = sub_logfont; + im_set_font(&norm_logfont); +} +#endif + +#ifdef FEAT_MBYTE +/* + * Handler of gui.wide_font (p_guifontwide) changed notification. + */ + void +gui_mch_wide_font_changed() +{ +# ifdef FEAT_MBYTE_IME + update_im_font(); +# endif +} +#endif + /* * Initialise vim to use the font with the given name. * Return FAIL if the font could not be loaded, OK otherwise. @@ -3112,9 +3150,10 @@ gui_mch_init_font(char_u *font_name, int fontset) font_name = lf.lfFaceName; #if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME) norm_logfont = lf; + sub_logfont = lf; #endif #ifdef FEAT_MBYTE_IME - im_set_font(&lf); + update_im_font(); #endif gui_mch_free_font(gui.norm_font); gui.norm_font = font; diff --git a/src/proto/gui_w16.pro b/src/proto/gui_w16.pro index c8cb06590d..4c53fad305 100644 --- a/src/proto/gui_w16.pro +++ b/src/proto/gui_w16.pro @@ -50,6 +50,7 @@ void gui_mch_delete_lines __ARGS((int row, int num_lines)); void gui_mch_insert_lines __ARGS((int row, int num_lines)); void gui_mch_exit __ARGS((int rc)); int gui_mch_init_font __ARGS((char_u *font_name, int fontset)); +void gui_mch_wide_font_changed __ARGS((void)); int gui_mch_maximized __ARGS((void)); void gui_mch_newfont __ARGS((void)); void gui_mch_settitle __ARGS((char_u *title, char_u *icon)); diff --git a/src/proto/gui_w32.pro b/src/proto/gui_w32.pro index 49690b03e4..405dd2859a 100644 --- a/src/proto/gui_w32.pro +++ b/src/proto/gui_w32.pro @@ -50,6 +50,7 @@ void gui_mch_delete_lines __ARGS((int row, int num_lines)); void gui_mch_insert_lines __ARGS((int row, int num_lines)); void gui_mch_exit __ARGS((int rc)); int gui_mch_init_font __ARGS((char_u *font_name, int fontset)); +void gui_mch_wide_font_changed __ARGS((void)); int gui_mch_maximized __ARGS((void)); void gui_mch_newfont __ARGS((void)); void gui_mch_settitle __ARGS((char_u *title, char_u *icon)); diff --git a/src/version.c b/src/version.c index a3351c3d0d..b60be3cd38 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 782, /**/ 781, /**/ From 3b11379956f3e65029812f74c75a81d6cdf82b85 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 23 Jan 2013 18:37:40 +0100 Subject: [PATCH 056/106] Added tag v7-3-782 for changeset 0de969850c06 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 47d7cff969..eb901734aa 100644 --- a/.hgtags +++ b/.hgtags @@ -2118,3 +2118,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 2067ed78d37c331685ef8f293d6a23c372ca4b78 v7-3-779 42edc5dac33c92876d93f00f8ab8c1f6bb25d3fc v7-3-780 29f29e86602e4a7f83d4572d2fe75b9b0de2752f v7-3-781 +0de969850c0687d2018e025f31e5cef9e9ce1444 v7-3-782 From 1ca5a52633b951b0adc94ee8ad9564d91b039f04 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 24 Jan 2013 21:00:20 +0100 Subject: [PATCH 057/106] updated for version 7.3.783 Problem: Crash when mark is not set. (Dominique Pelle) Solution: Check for NULL. --- src/normal.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/normal.c b/src/normal.c index 3d5b6d8171..b7f3dd4f5a 100644 --- a/src/normal.c +++ b/src/normal.c @@ -7552,6 +7552,7 @@ nv_gomark(cap) #endif #ifdef FEAT_FOLDING if (cap->oap->op_type == OP_NOP + && pos != NULL && (pos == (pos_T *)-1 || !equalpos(old_cursor, *pos)) && (fdo_flags & FDO_MARK) && old_KeyTyped) diff --git a/src/version.c b/src/version.c index b60be3cd38..cd838d41bf 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 783, /**/ 782, /**/ From 48cf1e16043923abcadeca3b9ada4221486e0a50 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 24 Jan 2013 21:00:20 +0100 Subject: [PATCH 058/106] Added tag v7-3-783 for changeset a80af62d5e3b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index eb901734aa..deda1e838d 100644 --- a/.hgtags +++ b/.hgtags @@ -2119,3 +2119,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 42edc5dac33c92876d93f00f8ab8c1f6bb25d3fc v7-3-780 29f29e86602e4a7f83d4572d2fe75b9b0de2752f v7-3-781 0de969850c0687d2018e025f31e5cef9e9ce1444 v7-3-782 +a80af62d5e3b3614ff9e058f42647c99bffe7481 v7-3-783 From 065f43769e9f8852bdc5e972c8eead451e72a106 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 25 Jan 2013 19:28:38 +0100 Subject: [PATCH 059/106] updated for version 7.3.784 Problem: Error when 'guifontwide' has a comma. Solution: Use gui.wide_font. (Taro Muraoka) --- src/gui_w48.c | 3 ++- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui_w48.c b/src/gui_w48.c index 0a7f367e87..2a5f696512 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -3107,7 +3107,8 @@ update_im_font() LOGFONT lf_wide; if (p_guifontwide != NULL && *p_guifontwide != NUL - && get_logfont(&lf_wide, p_guifontwide, NULL, TRUE) == OK) + && gui.wide_font != NOFONT + && GetObject((HFONT)gui.wide_font, sizeof(lf_wide), &lf_wide)) norm_logfont = lf_wide; else norm_logfont = sub_logfont; diff --git a/src/version.c b/src/version.c index cd838d41bf..9a94c54da6 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 784, /**/ 783, /**/ From 919cc50779cec5fc847509c0aeaa32fe681f7139 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 25 Jan 2013 19:28:39 +0100 Subject: [PATCH 060/106] Added tag v7-3-784 for changeset fbadf0f69877 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index deda1e838d..13d6813142 100644 --- a/.hgtags +++ b/.hgtags @@ -2120,3 +2120,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 29f29e86602e4a7f83d4572d2fe75b9b0de2752f v7-3-781 0de969850c0687d2018e025f31e5cef9e9ce1444 v7-3-782 a80af62d5e3b3614ff9e058f42647c99bffe7481 v7-3-783 +fbadf0f6987790d98c3b3fd935fea0494743830a v7-3-784 From bfccf8b7c1e0aa01ad0dcd8dab17adbdeba24e07 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 25 Jan 2013 20:11:01 +0100 Subject: [PATCH 061/106] updated for version 7.3.785 Problem: Crash with specific use of search pattern. Solution: Initialize reg_buf to curbuf. --- src/regexp.c | 9 ++++++--- src/version.c | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/regexp.c b/src/regexp.c index bb63c942f0..e62aae557f 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -3413,7 +3413,7 @@ static unsigned reg_tofreelen; * reg_startpos reg_mmatch->startpos * reg_endpos reg_mmatch->endpos * reg_win NULL window in which to search - * reg_buf buffer in which to search + * reg_buf curbuf buffer in which to search * reg_firstlnum first line in which to search * reg_maxline 0 last line nr * reg_line_lbr FALSE or TRUE FALSE @@ -3571,6 +3571,7 @@ vim_regexec(rmp, line, col) reg_mmatch = NULL; reg_maxline = 0; reg_line_lbr = FALSE; + reg_buf = curbuf; reg_win = NULL; ireg_ic = rmp->rm_ic; #ifdef FEAT_MBYTE @@ -3595,6 +3596,7 @@ vim_regexec_nl(rmp, line, col) reg_mmatch = NULL; reg_maxline = 0; reg_line_lbr = TRUE; + reg_buf = curbuf; reg_win = NULL; ireg_ic = rmp->rm_ic; #ifdef FEAT_MBYTE @@ -4311,8 +4313,8 @@ regmatch(scan) #endif else { - if (!vim_iswordc_buf(c, reg_buf) - || (reginput > regline && vim_iswordc_buf(reginput[-1], reg_buf))) + if (!vim_iswordc_buf(c, reg_buf) || (reginput > regline + && vim_iswordc_buf(reginput[-1], reg_buf))) status = RA_NOMATCH; } break; @@ -7135,6 +7137,7 @@ vim_regsub(rmp, source, dest, copy, magic, backslash) reg_match = rmp; reg_mmatch = NULL; reg_maxline = 0; + reg_buf = curbuf; return vim_regsub_both(source, dest, copy, magic, backslash); } #endif diff --git a/src/version.c b/src/version.c index 9a94c54da6..0f77ad2557 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 785, /**/ 784, /**/ From 2fe2b1611bf97ce805976b48b5e872573e7a6bae Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 25 Jan 2013 20:11:01 +0100 Subject: [PATCH 062/106] Added tag v7-3-785 for changeset be4baed0c933 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 13d6813142..c78070a18b 100644 --- a/.hgtags +++ b/.hgtags @@ -2121,3 +2121,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 0de969850c0687d2018e025f31e5cef9e9ce1444 v7-3-782 a80af62d5e3b3614ff9e058f42647c99bffe7481 v7-3-783 fbadf0f6987790d98c3b3fd935fea0494743830a v7-3-784 +be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785 From 3b7e2e5958952563ef9588690799a27fe79d7af7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 11:44:39 +0100 Subject: [PATCH 063/106] updated for version 7.3.786 Problem: Python threads don't run in the background (issue 103). Solution: Move the statements to manipulate thread state. --- src/if_python.c | 16 +++++++++------- src/version.c | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/if_python.c b/src/if_python.c index 5e792b16d1..1bf737fc4c 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -740,12 +740,11 @@ Python_Init(void) #else PyMac_Initialize(); #endif - /* Initialise threads, and save the state using PyGILState_Ensure. - * Without the call to PyGILState_Ensure, thread specific state (such - * as the system trace hook), will be lost between invocations of - * Python code. */ + /* Initialise threads, and below save the state using + * PyGILState_Ensure. Without the call to PyGILState_Ensure, thread + * specific state (such as the system trace hook), will be lost + * between invocations of Python code. */ PyEval_InitThreads(); - pygilstate = PyGILState_Ensure(); #ifdef DYNAMIC_PYTHON get_exceptions(); #endif @@ -756,6 +755,10 @@ Python_Init(void) if (PythonMod_Init()) goto fail; + /* The first python thread is vim's, release the lock. */ + Python_SaveThread(); + pygilstate = PyGILState_Ensure(); + globals = PyModule_GetDict(PyImport_AddModule("__main__")); /* Remove the element from sys.path that was added because of our @@ -764,8 +767,7 @@ Python_Init(void) * the current directory in sys.path. */ PyRun_SimpleString("import sys; sys.path = filter(lambda x: x != '/must>not&exist', sys.path)"); - /* the first python thread is vim's, release the lock */ - Python_SaveThread(); + PyGILState_Release(pygilstate); initialised = 1; } diff --git a/src/version.c b/src/version.c index 0f77ad2557..8115020bf3 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 786, /**/ 785, /**/ From 1704fa8a735122798051913f25ec262eb2899963 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 11:44:39 +0100 Subject: [PATCH 064/106] Added tag v7-3-786 for changeset 8b3e88bab702 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c78070a18b..8b3c759524 100644 --- a/.hgtags +++ b/.hgtags @@ -2122,3 +2122,4 @@ a6e60677aea727622dde15d1306c61588b805500 v7-3-775 a80af62d5e3b3614ff9e058f42647c99bffe7481 v7-3-783 fbadf0f6987790d98c3b3fd935fea0494743830a v7-3-784 be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785 +8b3e88bab70215a18768fca5a90c6f07ac1aa5eb v7-3-786 From 40b7fd4ec02aa8a6e5c904d3a83fa67fd8e67a36 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 12:31:36 +0100 Subject: [PATCH 065/106] updated for version 7.3.787 Problem: With 'relativenumber' set it is not possible to see the absolute line number. Solution: For the cursor line show the absolute line number instead of a zero. (Nazri Ramliy) --- src/screen.c | 30 +++++++++++++++++++++--------- src/version.c | 2 ++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/screen.c b/src/screen.c index 7e11fa4d8c..6d2345cbe5 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2319,6 +2319,7 @@ fold_line(wp, fold_count, foldinfo, lnum, row) { int w = number_width(wp); long num; + char *fmt = "%*ld "; if (len > w + 1) len = w + 1; @@ -2327,10 +2328,17 @@ fold_line(wp, fold_count, foldinfo, lnum, row) /* 'number' */ num = (long)lnum; else + { /* 'relativenumber', don't use negative numbers */ num = labs((long)get_cursor_rel_lnum(wp, lnum)); + if (num == 0) + { + num = lnum; + fmt = "%-*ld "; + } + } - sprintf((char *)buf, "%*ld ", w, num); + sprintf((char *)buf, fmt, w, num); #ifdef FEAT_RIGHTLEFT if (wp->w_p_rl) /* the line number isn't reversed */ @@ -3484,15 +3492,23 @@ win_line(wp, lnum, startrow, endrow, nochange) ) { long num; + char *fmt = "%*ld "; if (wp->w_p_nu) /* 'number' */ num = (long)lnum; else + { /* 'relativenumber', don't use negative numbers */ num = labs((long)get_cursor_rel_lnum(wp, lnum)); + if (num == 0) + { + num = lnum; + fmt = "%-*ld "; + } + } - sprintf((char *)extra, "%*ld ", + sprintf((char *)extra, fmt, number_width(wp), num); if (wp->w_skipcol > 0) for (p_extra = extra; *p_extra == ' '; ++p_extra) @@ -3513,7 +3529,8 @@ win_line(wp, lnum, startrow, endrow, nochange) * the current line differently. * TODO: Can we use CursorLine instead of CursorLineNr * when CursorLineNr isn't set? */ - if (wp->w_p_cul && lnum == wp->w_cursor.lnum) + if ((wp->w_p_cul || wp->w_p_rnu) + && lnum == wp->w_cursor.lnum) char_attr = hl_attr(HLF_CLN); #endif } @@ -10238,12 +10255,7 @@ number_width(wp) int n; linenr_T lnum; - if (wp->w_p_nu) - /* 'number' */ - lnum = wp->w_buffer->b_ml.ml_line_count; - else - /* 'relativenumber' */ - lnum = wp->w_height; + lnum = wp->w_buffer->b_ml.ml_line_count; if (lnum == wp->w_nrwidth_line_count) return wp->w_nrwidth_width; diff --git a/src/version.c b/src/version.c index 8115020bf3..ed6b493e87 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 787, /**/ 786, /**/ From 3fe927aefd0219713210b79609557f187083a54e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 12:31:36 +0100 Subject: [PATCH 066/106] Added tag v7-3-787 for changeset e1b98967a985 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8b3c759524..57045b0f52 100644 --- a/.hgtags +++ b/.hgtags @@ -2123,3 +2123,4 @@ a80af62d5e3b3614ff9e058f42647c99bffe7481 v7-3-783 fbadf0f6987790d98c3b3fd935fea0494743830a v7-3-784 be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785 8b3e88bab70215a18768fca5a90c6f07ac1aa5eb v7-3-786 +e1b98967a985f4d1ad889c8e69b822d9126411ab v7-3-787 From b9a86337d4691647a962a098a882810534eb4a52 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 12:50:56 +0100 Subject: [PATCH 067/106] updated for version 7.3.788 Problem: When only using patches build fails on missing nl.po. Solution: Create an empty nl.po file. --- src/po/Makefile | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/po/Makefile b/src/po/Makefile index 2814b3fe8a..09c8861b67 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -176,6 +176,10 @@ uninstall: converted: $(MOCONVERTED) +# nl.po was added later, if it does not exist use an empty file. +nl.po: + touch nl.po + # Norwegian/Bokmal: "nb" is an alias for "no". # Copying the file is not efficient, but I don't know of another way to make # this work. diff --git a/src/version.c b/src/version.c index ed6b493e87..8c19a1519c 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 788, /**/ 787, /**/ From 9c7838fb89aee518111b8c39be8aeba76e18c35c Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 12:50:57 +0100 Subject: [PATCH 068/106] Added tag v7-3-788 for changeset 386fc822dd00 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 57045b0f52..37011c9213 100644 --- a/.hgtags +++ b/.hgtags @@ -2124,3 +2124,4 @@ fbadf0f6987790d98c3b3fd935fea0494743830a v7-3-784 be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785 8b3e88bab70215a18768fca5a90c6f07ac1aa5eb v7-3-786 e1b98967a985f4d1ad889c8e69b822d9126411ab v7-3-787 +386fc822dd002958fdade4329845013cbfaa3dab v7-3-788 From d039f9ced0315b9ff784eb2f34d3482a5fc201e3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 13:59:37 +0100 Subject: [PATCH 069/106] updated for version 7.3.789 Problem: "\k" in regexp does not work in other window. Solution: Use the right buffer. (Yukihiro Nakadaira) --- src/mbyte.c | 10 +++++++++- src/proto/mbyte.pro | 1 + src/regexp.c | 15 ++++++++------- src/version.c | 2 ++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/mbyte.c b/src/mbyte.c index b896477fce..80f669135d 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -868,12 +868,20 @@ remove_bom(s) int mb_get_class(p) char_u *p; +{ + return mb_get_class_buf(p, curbuf); +} + + int +mb_get_class_buf(p, buf) + char_u *p; + buf_T *buf; { if (MB_BYTE2LEN(p[0]) == 1) { if (p[0] == NUL || vim_iswhite(p[0])) return 0; - if (vim_iswordc(p[0])) + if (vim_iswordc_buf(p[0], buf)) return 2; return 1; } diff --git a/src/proto/mbyte.pro b/src/proto/mbyte.pro index 8c0788c7fa..c599dacec9 100644 --- a/src/proto/mbyte.pro +++ b/src/proto/mbyte.pro @@ -4,6 +4,7 @@ char_u *mb_init __ARGS((void)); int bomb_size __ARGS((void)); void remove_bom __ARGS((char_u *s)); int mb_get_class __ARGS((char_u *p)); +int mb_get_class_buf __ARGS((char_u *p, buf_T *buf)); int dbcs_class __ARGS((unsigned lead, unsigned trail)); int latin_char2len __ARGS((int c)); int latin_char2bytes __ARGS((int c, char_u *buf)); diff --git a/src/regexp.c b/src/regexp.c index e62aae557f..b6506a03a6 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -4013,8 +4013,8 @@ static int reg_prev_class __ARGS((void)); reg_prev_class() { if (reginput > regline) - return mb_get_class(reginput - 1 - - (*mb_head_off)(regline, reginput - 1)); + return mb_get_class_buf(reginput - 1 + - (*mb_head_off)(regline, reginput - 1), reg_buf); return -1; } @@ -4304,7 +4304,7 @@ regmatch(scan) int this_class; /* Get class of current and previous char (if it exists). */ - this_class = mb_get_class(reginput); + this_class = mb_get_class_buf(reginput, reg_buf); if (this_class <= 1) status = RA_NOMATCH; /* not on a word at all */ else if (reg_prev_class() == this_class) @@ -4328,7 +4328,7 @@ regmatch(scan) int this_class, prev_class; /* Get class of current and previous char (if it exists). */ - this_class = mb_get_class(reginput); + this_class = mb_get_class_buf(reginput, reg_buf); prev_class = reg_prev_class(); if (this_class == prev_class || prev_class == 0 || prev_class == 1) @@ -4365,14 +4365,14 @@ regmatch(scan) break; case KWORD: - if (!vim_iswordp(reginput)) + if (!vim_iswordp_buf(reginput, reg_buf)) status = RA_NOMATCH; else ADVANCE_REGINPUT(); break; case SKWORD: - if (VIM_ISDIGIT(*reginput) || !vim_iswordp(reginput)) + if (VIM_ISDIGIT(*reginput) || !vim_iswordp_buf(reginput, reg_buf)) status = RA_NOMATCH; else ADVANCE_REGINPUT(); @@ -5734,7 +5734,8 @@ regrepeat(p, maxcount) case SKWORD + ADD_NL: while (count < maxcount) { - if (vim_iswordp(scan) && (testval || !VIM_ISDIGIT(*scan))) + if (vim_iswordp_buf(scan, reg_buf) + && (testval || !VIM_ISDIGIT(*scan))) { mb_ptr_adv(scan); } diff --git a/src/version.c b/src/version.c index 8c19a1519c..ecf21ac967 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 789, /**/ 788, /**/ From 3ed8a115fac66c00b4ca0aba8d6a11fb22c6eaac Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 13:59:37 +0100 Subject: [PATCH 070/106] Added tag v7-3-789 for changeset 43c15135926f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 37011c9213..d65ff4bdcc 100644 --- a/.hgtags +++ b/.hgtags @@ -2125,3 +2125,4 @@ be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785 8b3e88bab70215a18768fca5a90c6f07ac1aa5eb v7-3-786 e1b98967a985f4d1ad889c8e69b822d9126411ab v7-3-787 386fc822dd002958fdade4329845013cbfaa3dab v7-3-788 +43c15135926fb95fa82b01424677a9c37f4d0e46 v7-3-789 From 54f3afd445eec2503c4b1b8cbb9b11b0e3047882 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 14:13:56 +0100 Subject: [PATCH 071/106] updated for version 7.3.790 Problem: After reloading a buffer the modelines are not processed. Solution: call do_modelines(). (Ken Takata) --- src/fileio.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/fileio.c b/src/fileio.c index 470cce2525..c177e633c5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -7243,6 +7243,9 @@ buf_reload(buf, orig_mode) * reset it, might have had a read error. */ if (orig_mode == curbuf->b_orig_mode) curbuf->b_p_ro |= old_ro; + + /* Modelines must override settings done by autocommands. */ + do_modelines(0); } /* restore curwin/curbuf and a few other things */ diff --git a/src/version.c b/src/version.c index ecf21ac967..78dc34db10 100644 --- a/src/version.c +++ b/src/version.c @@ -725,6 +725,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 790, /**/ 789, /**/ From cd88883907ccde97dfb5786cc72a4ab262f306d7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 14:13:56 +0100 Subject: [PATCH 072/106] Added tag v7-3-790 for changeset 8819ea6dcb72 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index d65ff4bdcc..7485da6940 100644 --- a/.hgtags +++ b/.hgtags @@ -2126,3 +2126,4 @@ be4baed0c933e1f1543ea175e2e36551ff6caa18 v7-3-785 e1b98967a985f4d1ad889c8e69b822d9126411ab v7-3-787 386fc822dd002958fdade4329845013cbfaa3dab v7-3-788 43c15135926fb95fa82b01424677a9c37f4d0e46 v7-3-789 +8819ea6dcb72dcf61fd0d20f8ea1904a7546917f v7-3-790 From 8888c8cce46bf337ff4856ad7c12fe135bb89a5e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 30 Jan 2013 14:18:00 +0100 Subject: [PATCH 073/106] Update runtime files. --- runtime/doc/cmdline.txt | 9 +- runtime/doc/eval.txt | 7 +- runtime/doc/help.txt | 12 +- runtime/doc/if_pyth.txt | 6 +- runtime/doc/insert.txt | 6 +- runtime/doc/options.txt | 13 +- runtime/doc/pattern.txt | 4 +- runtime/doc/syntax.txt | 11 +- runtime/doc/todo.txt | 97 ++++-- runtime/doc/various.txt | 18 +- runtime/indent/sqlanywhere.vim | 11 +- runtime/menu.vim | 4 +- runtime/syntax/c.vim | 10 +- runtime/syntax/php.vim | 3 +- src/po/de.po | 6 +- src/po/uk.cp1251.po | 608 +++++++++++++++++++-------------- src/po/uk.po | 608 +++++++++++++++++++-------------- 17 files changed, 847 insertions(+), 586 deletions(-) diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 0ed5cb3d39..c3627d4090 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.3. Last change: 2012 Oct 11 +*cmdline.txt* For Vim version 7.3. Last change: 2013 Jan 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -714,10 +714,15 @@ three lines: > Visual Mode and Range *v_:* {Visual}: Starts a command-line with the Visual selected lines as a - range. The code ":'<,'>" is used for this range, which makes + range. The code `:'<,'>` is used for this range, which makes it possible to select a similar line from the command-line history for repeating a command on different Visually selected lines. + When Visual mode was already ended, a short way to use the + Visual area for a range is `:*`. This requires that "*" does + not appear in 'cpo', see |cpo-star|. Otherwise you will have + to type `:'<,'>` + ============================================================================== 5. Ex command-line flags *ex-flags* diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 7594ea9805..9819d9bc90 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2012 Dec 05 +*eval.txt* For Vim version 7.3. Last change: 2013 Jan 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5943,8 +5943,9 @@ taglist({expr}) *taglist()* If there are no matching tags, then an empty list is returned. To get an exact tag match, the anchors '^' and '$' should be - used in {expr}. Refer to |tag-regexp| for more information - about the tag search regular expression pattern. + used in {expr}. This also make the function work faster. + Refer to |tag-regexp| for more information about the tag + search regular expression pattern. Refer to |'tags'| for information about how the tags file is located by Vim. Refer to |tags-file-format| for the format of diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 4860eb2fc0..bca336498a 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 7.3. Last change: 2010 Jul 20 +*help.txt* For Vim version 7.3. Last change: 2012 Dec 06 VIM - main help file k @@ -195,12 +195,12 @@ Remarks about specific systems ~ *standard-plugin-list* Standard plugins ~ |pi_getscript.txt| Downloading latest version of Vim scripts -|pi_gzip.txt| Reading and writing compressed files -|pi_netrw.txt| Reading and writing files over a network -|pi_paren.txt| Highlight matching parens -|pi_tar.txt| Tar file explorer +|pi_gzip.txt| Reading and writing compressed files +|pi_netrw.txt| Reading and writing files over a network +|pi_paren.txt| Highlight matching parens +|pi_tar.txt| Tar file explorer |pi_vimball.txt| Create a self-installing Vim script -|pi_zip.txt| Zip archive explorer +|pi_zip.txt| Zip archive explorer LOCAL ADDITIONS: *local-additions* diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index ec7d2396ea..23b6b38abf 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.3. Last change: 2012 Sep 23 +*if_pyth.txt* For Vim version 7.3. Last change: 2013 Jan 30 VIM REFERENCE MANUAL by Paul Moore @@ -54,8 +54,8 @@ Example: > EOF endfunction < -Note: Python is very sensitive to the indenting. Also make sure the "class" -line and "EOF" do not have any indent. +Note: Python is very sensitive to the indenting. Make sure the "class" line +and "EOF" do not have any indent. *:pyfile* *:pyf* :[range]pyf[ile] {file} diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index bf020fd427..4db43418b6 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.3. Last change: 2012 Jul 10 +*insert.txt* For Vim version 7.3. Last change: 2013 Jan 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -380,7 +380,9 @@ The CTRL-O command sometimes has a side effect: If the cursor was beyond the end of the line, it will be put on the last character in the line. In mappings it's often better to use (first put an "x" in the text, will then always put the cursor on it). Or use CTRL-\ CTRL-O, but then -beware of the cursor possibly being beyond the end of the line. +beware of the cursor possibly being beyond the end of the line. Note that the +command following CTRL-\ CTRL-O can still move the cursor, it is not restored +to its original position. The CTRL-O command takes you to Normal mode. If you then use a command enter Insert mode again it normally doesn't nest. Thus when typing "aa" and diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index c3cc0871c4..3beb2b0cff 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2012 Oct 21 +*options.txt* For Vim version 7.3. Last change: 2013 Jan 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3562,7 +3562,7 @@ A jump table for the options with a short description can be found at |Q_op|. Windows +multibyte only: *guifontwide_win_mbyte* - If set and vaild, 'guifontwide' is used for IME instead of 'guifont'. + If set and valid, 'guifontwide' is used for IME instead of 'guifont'. *'guiheadroom'* *'ghr'* 'guiheadroom' 'ghr' number (default 50) @@ -3824,7 +3824,8 @@ A jump table for the options with a short description can be found at |Q_op|. |hl-ModeMsg| M Mode (e.g., "-- INSERT --") |hl-LineNr| n line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. - |hl-CursorLineNr| N like n for when 'cursorline' is set. + |hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is + set. |hl-Question| r |hit-enter| prompt and yes/no questions |hl-StatusLine| s status line of current window |status-line| |hl-StatusLineNC| S status lines of not-current windows @@ -4717,8 +4718,10 @@ A jump table for the options with a short description can be found at |Q_op|. local to buffer {not in Vi} Characters that form pairs. The |%| command jumps from one to the - other. Currently only single byte character pairs are allowed, and - they must be different. The characters must be separated by a colon. + other. + Only character pairs are allowed that are different, thus you cannot + jump between two double quotes. + The characters must be separated by a colon. The pairs must be separated by a comma. Example for including '<' and '>' (HTML): > :set mps+=<:> diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 5c4a790208..6040ba88f8 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.3. Last change: 2012 May 18 +*pattern.txt* For Vim version 7.3. Last change: 2013 Jan 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -993,6 +993,8 @@ x A single character, with no special meaning, matches itself [xyz] any 'x', 'y' or 'z' [a-zA-Z]$ any alphabetic character at the end of a line \c[a-z]$ same + [А-яЁё] Russian alphabet (with utf-8 and cp1251) + */[\n]* With "\_" prepended the collection also includes the end-of-line. The same can be done by including "\n" in the collection. The diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 5b565859e4..b48307d015 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.3. Last change: 2012 Nov 28 +*syntax.txt* For Vim version 7.3. Last change: 2013 Jan 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3903,9 +3903,9 @@ External matches *:syn-ext-match* These extra regular expression items are available in region patterns: */\z(* */\z(\)* *E50* *E52* - \z(\) Marks the sub-expression as "external", meaning that it is can - be accessed from another pattern match. Currently only usable - in defining a syntax region start pattern. + \z(\) Marks the sub-expression as "external", meaning that it can be + accessed from another pattern match. Currently only usable in + defining a syntax region start pattern. */\z1* */\z2* */\z3* */\z4* */\z5* \z1 ... \z9 */\z6* */\z7* */\z8* */\z9* *E66* *E67* @@ -4592,7 +4592,8 @@ IncSearch 'incsearch' highlighting; also used for the text replaced with LineNr Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. *hl-CursorLineNr* -CursorLineNr Like LineNr when 'cursorline' is set for the cursor line. +CursorLineNr Like LineNr when 'cursorline' or 'relativenumber' is set for + the cursor line. *hl-MatchParen* MatchParen The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 47dbce6dd3..a4737ac964 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2012 Dec 05 +*todo.txt* For Vim version 7.3. Last change: 2013 Jan 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -34,9 +34,8 @@ not be repeated below, unless there is extra information. *known-bugs* -------------------- Known bugs and current work ----------------------- -On external command get the message: - SIGCHLD handler called (some thread has SIGCHLD unblocked) -From MzScheme +Several syntax file match "^\s*" which may get underlined if that's in the +highlight group. Add a "\zs" after it? Go through more coverity reports. @@ -53,30 +52,8 @@ The CompleteDone autocommand needs some info passed to it: - The word that was selected (empty if abandoned complete) - Type of completion: tag, omnifunc, user func. -Patch for matchit.vim. (Mike Morearty, 2012 Nov 28) - -Patch to fix that the QuitPre autocommand clears the quitmore flag. (Techlive -Zheng, 2012 Nov 28) - -":gundo" command: global undo. Undoes changes spread over multiple files in -the order they were made. Also ":gredo". Both with a count. Useful when -tests fail after making changes and you forgot in which files. - -Patch to make updating tabline faster. (Arseny Kapoulkine, 2012 Oct 3) -Also remove the "rc" variable. - -Patch to make "- register not always used. (Christian Brabandt, 2012 Nov 28) - -Crash with vimdiff. (Don Cruickshank, 2012 Sep 23) - -Patch to support subdirectories for help files. (Charles Campbell, 2012 Nov -21) - Patch for mzscheme. (Sergey Khorev, 2012 Nov 19) -What about ignoring SEGV? - -Win32: use 'guifontwide' for IME composition. (Taro Muraoka, 2012 Sep 30) -Update Oct 2. +Updated patch 2013 Jan 28. Patch to fix :s command with confirm and typing "a". (Christian Brabandt, 2012 Oct 28) @@ -88,24 +65,45 @@ Test files in archive in another message. Patch to make multibyte input work on Win32 console when codepage differs from 'encoding'. (Ken Takata, 2012 Sep 29) -It's possible to defined an input() function that overrides the built-in one. +Patch for building with Ruby and Cygwin. (Ken Takata, 2013 Jan 9) + +Patch to make 'relativenumber' show the current lnum instead of zero. +(Nazri Ramliy, 2013 Jan 29) + +It's possible to define an input() function that overrides the built-in one. (ZyX, 2012 Sep 28) +Patch to add sha256() function. (Tyru, 2013 Jan 8) + +Patch to make pyeval() print error messages. (ZyX, 2013 Jan 12) + Win32: When a directory name contains an exclamation mark, completion doesn't complete the contents of the directory. No escaping for the "!"? (Jan Stocker, 2012 Jan 5) +Patch for Win32 clipboard under Cygwin. (Frodak Baksik, Feb 15) + Sutcliffe says it works well. + Update 2007 May 22 for Vim 7.1 + Update 2008 Dec 2008 for Vim 7.2.xx (Sharonov) + Update by Ken Takata (2012 Dec 31, 2013 Jan 4, 2013 Jan 26) + Problem parsing expression with function(). (Andy Wokula, 2012 Nov 22) Patch by Christian Brabandt, Nov 22. Tests in another patch, Nov 23. +Patch to add default value to getbufvar() et al. (Hirohito Higashi, 2013 Jan 1) + Problem caused by patch 7.3.638: window->open does not update window correctly. Issue 91. +Patch to fix compiler warnings for MingW 4.5.3. (Ken Takata, 2013 Jan 26) + Do allow real tags above the !_TAG entries. Undo older patch. Issue 90. Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep 28) With tests: Oct 9. +Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec) + Patch for IME handling, adds 'imactivatefunc' and 'imstatusfunc' option. (Yukihiro Nakadaira, 2012 Aug 16) Patch to improve IME handling. (Yasuhiro Matsumoto, 2012 Jul 18) @@ -136,6 +134,8 @@ MS-Windows: Crash opening very long file name starting with "\\". It's probably a good idea to make a negative value for 'sts' use the value of 'sw'. Patch by So8res, Oct 3 2012 +patch to add "combine" flag to syntax commands. (so8res, 2012 Dec 6) + Syntax update problem in one buffer opened in two windows, bottom window is not correctly updated. (Paul Harris, 2012 Feb 27) @@ -145,9 +145,22 @@ Alternate patch by Gary Johnson, Sep 4. Patch to add getsid(). (Tyru, 2011 Oct 2) Do we want this? Update Oct 4. Or use expand('')? +Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9) + +Patch to add functions for signs. (Christian Brabandt,, 2013 Jan 27) + +Patch to use directX to draw text on Windows. Adds the 'directx' option. +(Taro Muraoka, 2013 Jan 25) + +b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan +7) + Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers, 2012 Aug 4) +Patch to improve equivalence classes in regexp patterns. +(Christian Brabandt, 2013 Jan 16, update Jan 17) + Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24) But use Gnome instead of GTK? @@ -160,6 +173,7 @@ Crash in autocmd that unloads buffers in a BufUnload event. (Andrew Pimlott, MS-Windows ACL support doesn't work well. Patch from Ken Takata, 2012 Aug 29. Update Aug 31. +Another patch for MingW, 2012 Dec 29. MS-Windows resizing problems: - Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun @@ -260,7 +274,7 @@ Update Jun 2. Patch to add ":py3do". (Lilydjwg, 2012 Apr 7) -`[ moves to character after insert, instead of the last inserted character. +`] moves to character after insert, instead of the last inserted character. (Yukihiro Nakadaira, 2011 Dec 9) Plugin for Modeleasy. (Massimiliano Tripoli, 2011 Nov 29) @@ -388,6 +402,11 @@ string() can't parse back "inf" and "nan". Fix documentation or fix code? Make 'formatprg' global-local. (Sung Pae) +When a buffer-local mapping is used, but a global mapping starts with the same +characters, Vim currently waits for the next typed character to find out if +the global mapping matches. It is probably better to let the local mapping +win and not wait. (discussion with Andy Wokula, 2013 Jan 30) + When doing "redir => s:foo" in a script and then "redir END" somewhere else (e.g. in a function) it can't find s:foo. @@ -516,6 +535,9 @@ names, shell commands and the like. (Kikuchan, 2010 Oct 14) Assume the system converts between the actual encoding of the filesystem to the system encoding (usually utf-8). +Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan +26) + Problem producing tags file when hebrew.frx is present. It has a BOM. Results in E670. (Tony Mechelynck, 2010 May 2) @@ -714,7 +736,7 @@ to avoid changing 'eventignore'? Patch for displaying 0x200c and 0x200d. (Ali Gholami Rudi, 2009 May 6) Probably needs a bit of work. -List of encoding aliases. (Takao Fujiware, 2009 Jul 18) +List of encoding aliases. (Takao Fujiwara, 2009 Jul 18) Are they all OK? Update Jul 22. Win32: Improved Makefile for MSVC. (Leonardo Valeri Manera, 2010 Aug 18) @@ -744,7 +766,7 @@ Problem with