From 3807a570a4011a39d2f2584fdf83221c177be690 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Jun 18 2012 11:20:56 +0000 Subject: Merge commit '9a75430f62cfde14a061ef86cd7e3d7ce3f91ea1' Conflicts: vim.spec --- diff --git a/7.3.516 b/7.3.516 new file mode 100644 index 0000000..d43be5a --- /dev/null +++ b/7.3.516 @@ -0,0 +1,94 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.516 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.516 +Problem: extend(o, o) may crash Vim. +Solution: Fix crash and add test. (Thinca and Hirohito Higashi) +Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok + + +*** ../vim-7.3.515/src/eval.c 2012-04-30 17:35:44.000000000 +0200 +--- src/eval.c 2012-05-18 12:02:44.000000000 +0200 +*************** +*** 10191,10197 **** + EMSG2(_("E737: Key already exists: %s"), hi2->hi_key); + break; + } +! else if (*action == 'f') + { + clear_tv(&di1->di_tv); + copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv); +--- 10191,10197 ---- + EMSG2(_("E737: Key already exists: %s"), hi2->hi_key); + break; + } +! else if (*action == 'f' && HI2DI(hi2) != di1) + { + clear_tv(&di1->di_tv); + copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv); +*** ../vim-7.3.515/src/testdir/test55.in 2010-11-10 20:31:24.000000000 +0100 +--- src/testdir/test55.in 2012-05-18 11:57:23.000000000 +0200 +*************** +*** 352,357 **** +--- 352,375 ---- + :let dict4copy = deepcopy(dict4) + :$put =(l == lcopy) + :$put =(dict4 == dict4copy) ++ :" ++ :" Pass the same List to extend() ++ :let l = [1, 2, 3, 4, 5] ++ :call extend(l, l) ++ :$put =string(l) ++ :" ++ :" Pass the same Dict to extend() ++ :let d = { 'a': {'b': 'B'}} ++ :call extend(d, d) ++ :$put =string(d) ++ :" ++ :" Pass the same Dict to extend() with "error" ++ :try ++ : call extend(d, d, "error") ++ :catch ++ : $put =v:exception[:15] . v:exception[-1:-1] ++ :endtry ++ :$put =string(d) + :endfun + :" + :call Test(1, 2, [3, 4], {5: 6}) " This may take a while +*** ../vim-7.3.515/src/testdir/test55.ok 2010-11-10 20:31:24.000000000 +0100 +--- src/testdir/test55.ok 2012-05-18 11:57:01.000000000 +0200 +*************** +*** 111,113 **** +--- 111,117 ---- + 0 + 1 + 1 ++ [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] ++ {'a': {'b': 'B'}} ++ Vim(call):E737: a ++ {'a': {'b': 'B'}} +*** ../vim-7.3.515/src/version.c 2012-04-30 21:09:38.000000000 +0200 +--- src/version.c 2012-05-18 12:04:54.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 516, + /**/ + +-- +I used to wonder about the meaning of life. But I looked it +up in the dictionary under "L" and there it was - the meaning +of life. It was less than I expected. - Dogbert + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.517 b/7.3.517 new file mode 100644 index 0000000..343693b --- /dev/null +++ b/7.3.517 @@ -0,0 +1,60 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.517 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.517 +Problem: Crash when using "vipvv". (Alexandre Provencio) +Solution: Don't let the text length become negative. +Files: src/ops.c + + +*** ../vim-7.3.516/src/ops.c 2012-04-20 13:46:02.000000000 +0200 +--- src/ops.c 2012-05-18 12:28:09.000000000 +0200 +*************** +*** 3042,3047 **** +--- 3042,3049 ---- + } + #endif + } ++ if (endcol == MAXCOL) ++ endcol = (colnr_T)STRLEN(p); + if (startcol > endcol + #ifdef FEAT_VIRTUALEDIT + || is_oneChar +*************** +*** 3050,3057 **** + bd.textlen = 0; + else + { +- if (endcol == MAXCOL) +- endcol = (colnr_T)STRLEN(p); + bd.textlen = endcol - startcol + oap->inclusive; + } + bd.textstart = p + startcol; +--- 3052,3057 ---- +*** ../vim-7.3.516/src/version.c 2012-05-18 12:06:58.000000000 +0200 +--- src/version.c 2012-05-18 12:48:51.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 517, + /**/ + +-- +BODY: I'm not dead! +CART DRIVER: 'Ere. He says he's not dead. +LARGE MAN: Yes he is. +BODY: I'm not! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.518 b/7.3.518 new file mode 100644 index 0000000..89429f0 --- /dev/null +++ b/7.3.518 @@ -0,0 +1,57 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.518 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.518 +Problem: When 'encoding' is a double-byte encoding ":helptags" may not find + tags correctly. +Solution: Use vim_strbyte() instead of vim_strchr(). (Yasuhiro Matsumoto) +Files: src/ex_cmds.c + + +*** ../vim-7.3.517/src/ex_cmds.c 2012-04-25 17:32:14.000000000 +0200 +--- src/ex_cmds.c 2012-05-18 16:20:20.000000000 +0200 +*************** +*** 6535,6541 **** + p1 = vim_strchr(IObuff, '*'); /* find first '*' */ + while (p1 != NULL) + { +! p2 = vim_strchr(p1 + 1, '*'); /* find second '*' */ + if (p2 != NULL && p2 > p1 + 1) /* skip "*" and "**" */ + { + for (s = p1 + 1; s < p2; ++s) +--- 6535,6544 ---- + p1 = vim_strchr(IObuff, '*'); /* find first '*' */ + while (p1 != NULL) + { +! /* Use vim_strbyte() instead of vim_strchr() so that when +! * 'encoding' is dbcs it still works, don't find '*' in the +! * second byte. */ +! p2 = vim_strbyte(p1 + 1, '*'); /* find second '*' */ + if (p2 != NULL && p2 > p1 + 1) /* skip "*" and "**" */ + { + for (s = p1 + 1; s < p2; ++s) +*** ../vim-7.3.517/src/version.c 2012-05-18 12:49:33.000000000 +0200 +--- src/version.c 2012-05-18 16:23:50.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 518, + /**/ + +-- +If all you have is a hammer, everything looks like a nail. +When your hammer is C++, everything begins to look like a thumb. + -- Steve Hoflich, comp.lang.c++ + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.519 b/7.3.519 new file mode 100644 index 0000000..846cea6 --- /dev/null +++ b/7.3.519 @@ -0,0 +1,64 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.519 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.519 +Problem: When completefunction returns it cannot indicate end of completion + mode. +Solution: Recognize completefunction returning -3. (Mtsushita Shougo) +Files: src/edit.c + + +*** ../vim-7.3.518/src/edit.c 2012-04-30 18:18:43.000000000 +0200 +--- src/edit.c 2012-05-18 16:35:06.000000000 +0200 +*************** +*** 5205,5213 **** + } + + /* Return value -2 means the user complete function wants to +! * cancel the complete without an error. */ + if (col == -2) + return FAIL; + + /* + * Reset extended parameters of completion, when start new +--- 5205,5221 ---- + } + + /* Return value -2 means the user complete function wants to +! * cancel the complete without an error. +! * Return value -3 does the same as -2 and leaves CTRL-X mode.*/ + if (col == -2) + return FAIL; ++ if (col == -3) ++ { ++ ctrl_x_mode = 0; ++ edit_submode = NULL; ++ msg_clr_cmdline(); ++ return FAIL; ++ } + + /* + * Reset extended parameters of completion, when start new +*** ../vim-7.3.518/src/version.c 2012-05-18 16:24:06.000000000 +0200 +--- src/version.c 2012-05-18 16:34:27.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 519, + /**/ + +-- +Looking at Perl through Lisp glasses, Perl looks atrocious. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.520 b/7.3.520 new file mode 100644 index 0000000..9e2da8d --- /dev/null +++ b/7.3.520 @@ -0,0 +1,140 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.520 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.520 +Problem: Gvim starts up slow on Unbuntu 12.04. +Solution: Move the call to gui_mch_init_check() to after fork(). (Yasuhiro + Matsumoto) Do check $DISPLAY being set. +Files: src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro + + +*** ../vim-7.3.519/src/gui.c 2011-10-20 21:27:57.000000000 +0200 +--- src/gui.c 2012-05-18 16:53:14.000000000 +0200 +*************** +*** 270,275 **** +--- 270,281 ---- + } + /* Child */ + ++ #ifdef FEAT_GUI_GTK ++ /* Call gtk_init_check() here after fork(). See gui_init_check(). */ ++ if (gui_mch_init_check() != OK) ++ exit(1); ++ #endif ++ + # if defined(HAVE_SETSID) || defined(HAVE_SETPGID) + /* + * Change our process group. On some systems/shells a CTRL-C in the +*************** +*** 430,436 **** +--- 436,452 ---- + #ifdef ALWAYS_USE_GUI + result = OK; + #else ++ # ifdef FEAT_GUI_GTK ++ /* ++ * Note: Don't call gtk_init_check() before fork, it will be called after ++ * the fork. When calling it before fork, it make vim hang for a while. ++ * See gui_do_fork(). ++ * Use a simpler check if the GUI window can probably be opened. ++ */ ++ result = gui.dofork ? gui_mch_early_init_check() : gui_mch_init_check(); ++ # else + result = gui_mch_init_check(); ++ # endif + #endif + return result; + } +*** ../vim-7.3.519/src/gui_gtk_x11.c 2011-10-26 11:36:21.000000000 +0200 +--- src/gui_gtk_x11.c 2012-05-18 17:00:45.000000000 +0200 +*************** +*** 1414,1420 **** + } + + /* +! * Check if the GUI can be started. Called before gvimrc is sourced. + * Return OK or FAIL. + */ + int +--- 1414,1442 ---- + } + + /* +! * Check if the GUI can be started. Called before gvimrc is sourced and +! * before fork(). +! * Return OK or FAIL. +! */ +! int +! gui_mch_early_init_check(void) +! { +! char_u *p; +! +! /* Guess that when $DISPLAY isn't set the GUI can't start. */ +! p = mch_getenv((char_u *)"DISPLAY"); +! if (p == NULL || *p == NUL) +! { +! gui.dying = TRUE; +! EMSG(_((char *)e_opendisp)); +! return FAIL; +! } +! return OK; +! } +! +! /* +! * Check if the GUI can be started. Called before gvimrc is sourced but after +! * fork(). + * Return OK or FAIL. + */ + int +*************** +*** 3050,3056 **** + + for (i = 0; i < (int)N_SELECTION_TARGETS; ++i) + { +! /* OpenOffice tries to use TARGET_HTML and fails when it doesn't + * return something, instead of trying another target. Therefore only + * offer TARGET_HTML when it works. */ + if (!clip_html && selection_targets[i].info == TARGET_HTML) +--- 3072,3078 ---- + + for (i = 0; i < (int)N_SELECTION_TARGETS; ++i) + { +! /* OpenOffice tries to use TARGET_HTML and fails when we don't + * return something, instead of trying another target. Therefore only + * offer TARGET_HTML when it works. */ + if (!clip_html && selection_targets[i].info == TARGET_HTML) +*** ../vim-7.3.519/src/proto/gui_gtk_x11.pro 2011-08-10 17:44:41.000000000 +0200 +--- src/proto/gui_gtk_x11.pro 2012-05-18 16:54:28.000000000 +0200 +*************** +*** 4,9 **** +--- 4,10 ---- + void gui_mch_set_blinking __ARGS((long waittime, long on, long off)); + void gui_mch_stop_blink __ARGS((void)); + void gui_mch_start_blink __ARGS((void)); ++ int gui_mch_early_init_check __ARGS((void)); + int gui_mch_init_check __ARGS((void)); + void gui_mch_show_tabline __ARGS((int showit)); + int gui_mch_showing_tabline __ARGS((void)); +*** ../vim-7.3.519/src/version.c 2012-05-18 16:35:17.000000000 +0200 +--- src/version.c 2012-05-18 16:45:30.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 520, + /**/ + +-- +Bad programs can be written in any language. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.521 b/7.3.521 new file mode 100644 index 0000000..efe7122 --- /dev/null +++ b/7.3.521 @@ -0,0 +1,129 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.521 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.521 +Problem: Using "z=" on a multi-byte character may cause a crash. +Solution: Don't use strlen() on an int pointer. +Files: src/spell.c + + +*** ../vim-7.3.520/src/spell.c 2012-01-10 22:26:12.000000000 +0100 +--- src/spell.c 2012-05-18 18:01:58.000000000 +0200 +*************** +*** 14494,14506 **** + int p0 = -333; + int c0; + int did_white = FALSE; + + /* + * Convert the multi-byte string to a wide-character string. + * Remove accents, if wanted. We actually remove all non-word characters. + * But keep white space. + */ +! n = 0; + for (s = inword; *s != NUL; ) + { + t = s; +--- 14494,14508 ---- + int p0 = -333; + int c0; + int did_white = FALSE; ++ int wordlen; ++ + + /* + * Convert the multi-byte string to a wide-character string. + * Remove accents, if wanted. We actually remove all non-word characters. + * But keep white space. + */ +! wordlen = 0; + for (s = inword; *s != NUL; ) + { + t = s; +*************** +*** 14521,14532 **** + continue; + } + } +! word[n++] = c; + } +! word[n] = NUL; + + /* +! * This comes from Aspell phonet.cpp. + * Converted from C++ to C. Added support for multi-byte chars. + * Changed to keep spaces. + */ +--- 14523,14534 ---- + continue; + } + } +! word[wordlen++] = c; + } +! word[wordlen] = NUL; + + /* +! * This algorithm comes from Aspell phonet.cpp. + * Converted from C++ to C. Added support for multi-byte chars. + * Changed to keep spaces. + */ +*************** +*** 14711,14717 **** + } + if (k > k0) + mch_memmove(word + i + k0, word + i + k, +! sizeof(int) * (STRLEN(word + i + k) + 1)); + + /* new "actual letter" */ + c = word[i]; +--- 14713,14719 ---- + } + if (k > k0) + mch_memmove(word + i + k0, word + i + k, +! sizeof(int) * (wordlen - (i + k) + 1)); + + /* new "actual letter" */ + c = word[i]; +*************** +*** 14739,14745 **** + if (c != NUL) + wres[reslen++] = c; + mch_memmove(word, word + i + 1, +! sizeof(int) * (STRLEN(word + i + 1) + 1)); + i = 0; + z0 = 1; + } +--- 14741,14747 ---- + if (c != NUL) + wres[reslen++] = c; + mch_memmove(word, word + i + 1, +! sizeof(int) * (wordlen - (i + 1) + 1)); + i = 0; + z0 = 1; + } +*** ../vim-7.3.520/src/version.c 2012-05-18 17:03:14.000000000 +0200 +--- src/version.c 2012-05-18 18:06:29.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 521, + /**/ + +-- +OLD WOMAN: King of the WHO? +ARTHUR: The Britons. +OLD WOMAN: Who are the Britons? + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.522 b/7.3.522 new file mode 100644 index 0000000..2f4d17c --- /dev/null +++ b/7.3.522 @@ -0,0 +1,56 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.522 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.522 +Problem: Crash in vim_realloc() when using MEM_PROFILE. +Solution: Avoid using a NULL argument. (Dominique Pelle) +Files: src/eval.c + + +*** ../vim-7.3.521/src/eval.c 2012-05-18 12:06:58.000000000 +0200 +--- src/eval.c 2012-05-18 18:19:25.000000000 +0200 +*************** +*** 14643,14649 **** + long growmin = (long)((p - start) * 2 + prevlen); + prevsize = grow50pc > growmin ? grow50pc : growmin; + } +! if ((newprev = vim_realloc(prev, prevsize)) == NULL) + { + do_outofmem_msg((long_u)prevsize); + failed = TRUE; +--- 14643,14651 ---- + long growmin = (long)((p - start) * 2 + prevlen); + prevsize = grow50pc > growmin ? grow50pc : growmin; + } +! newprev = prev == NULL ? alloc(prevsize) +! : vim_realloc(prev, prevsize); +! if (newprev == NULL) + { + do_outofmem_msg((long_u)prevsize); + failed = TRUE; +*** ../vim-7.3.521/src/version.c 2012-05-18 18:07:57.000000000 +0200 +--- src/version.c 2012-05-18 18:33:36.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 522, + /**/ + +-- +ARTHUR: ... and I am your king .... +OLD WOMAN: Ooooh! I didn't know we had a king. I thought we were an + autonomous collective ... + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.523 b/7.3.523 new file mode 100644 index 0000000..7eec3ea --- /dev/null +++ b/7.3.523 @@ -0,0 +1,103 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.523 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.523 +Problem: ":diffupdate" doesn't check for files changed elsewhere. +Solution: Add the ! flag. (Christian Brabandt) +Files: runtime/doc/diff.txt, src/diff.c, src/ex_cmds.h + + +*** ../vim-7.3.522/runtime/doc/diff.txt 2010-08-15 21:57:16.000000000 +0200 +--- runtime/doc/diff.txt 2012-05-18 18:41:49.000000000 +0200 +*************** +*** 178,184 **** + nodiff" before hiding it. + + *:diffu* *:diffupdate* +! :diffu[pdate] Update the diff highlighting and folds. + + Vim attempts to keep the differences updated when you make changes to the + text. This mostly takes care of inserted and deleted lines. Changes within a +--- 178,184 ---- + nodiff" before hiding it. + + *:diffu* *:diffupdate* +! :diffu[pdate][!] Update the diff highlighting and folds. + + Vim attempts to keep the differences updated when you make changes to the + text. This mostly takes care of inserted and deleted lines. Changes within a +*************** +*** 187,192 **** +--- 187,195 ---- + + :diffupdate + ++ If the ! is included Vim will check if the file was changed externally and ++ needs to be reloaded. It will prompt for each changed file, like `:checktime` ++ was used. + + Vim will show filler lines for lines that are missing in one window but are + present in another. These lines were inserted in another file or deleted in +*** ../vim-7.3.522/src/diff.c 2010-09-21 16:56:29.000000000 +0200 +--- src/diff.c 2012-05-18 18:45:09.000000000 +0200 +*************** +*** 783,788 **** +--- 783,797 ---- + goto theend; + } + ++ /* :diffupdate! */ ++ if (eap != NULL && eap->forceit) ++ for (idx_new = idx_orig; idx_new < DB_COUNT; ++idx_new) ++ { ++ buf = curtab->tp_diffbuf[idx_new]; ++ if (buf_valid(buf)) ++ buf_check_timestamp(buf, FALSE); ++ } ++ + /* Write the first buffer to a tempfile. */ + buf = curtab->tp_diffbuf[idx_orig]; + if (diff_write(buf, tmp_orig) == FAIL) +*** ../vim-7.3.522/src/ex_cmds.h 2012-02-13 00:01:38.000000000 +0100 +--- src/ex_cmds.h 2012-05-18 18:37:56.000000000 +0200 +*************** +*** 304,310 **** + EX(CMD_display, "display", ex_display, + EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_diffupdate, "diffupdate", ex_diffupdate, +! TRLBAR), + EX(CMD_diffget, "diffget", ex_diffgetput, + RANGE|EXTRA|TRLBAR|MODIFY), + EX(CMD_diffoff, "diffoff", ex_diffoff, +--- 304,310 ---- + EX(CMD_display, "display", ex_display, + EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN), + EX(CMD_diffupdate, "diffupdate", ex_diffupdate, +! BANG|TRLBAR), + EX(CMD_diffget, "diffget", ex_diffgetput, + RANGE|EXTRA|TRLBAR|MODIFY), + EX(CMD_diffoff, "diffoff", ex_diffoff, +*** ../vim-7.3.522/src/version.c 2012-05-18 18:34:15.000000000 +0200 +--- src/version.c 2012-05-18 18:39:13.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 523 + /**/ + +-- +"The future's already arrived - it's just not evenly distributed yet." + -- William Gibson + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.524 b/7.3.524 new file mode 100644 index 0000000..80d7baf --- /dev/null +++ b/7.3.524 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.524 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.524 (after 7.3.523) +Problem: Missing comma. +Solution: Add the comma. +Files: src/version.c + + +*** ../vim-7.3.523/src/version.c 2012-05-18 18:47:11.000000000 +0200 +--- src/version.c 2012-05-18 21:52:26.000000000 +0200 +*************** +*** 715,721 **** + static int included_patches[] = + { /* Add new patch number below this line */ + /**/ +! 523 + /**/ + 522, + /**/ +--- 715,723 ---- + static int included_patches[] = + { /* Add new patch number below this line */ + /**/ +! 524, +! /**/ +! 523, + /**/ + 522, + /**/ + +-- +DENNIS: You can't expect to wield supreme executive power just 'cause some + watery tart threw a sword at you! + "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.525 b/7.3.525 new file mode 100644 index 0000000..c9741cb --- /dev/null +++ b/7.3.525 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.525 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.525 +Problem: Compiler warning on 64 bit MS-Windows. +Solution: Add type cast. (Mike Williams) +Files: src/ex_getln.c + + +*** ../vim-7.3.524/src/ex_getln.c 2012-04-30 18:48:38.000000000 +0200 +--- src/ex_getln.c 2012-05-23 20:33:16.000000000 +0200 +*************** +*** 5263,5269 **** + { + static char_u compl[2] = { NUL, NUL }; + char *short_names = ":=@>?/"; +! int short_names_count = STRLEN(short_names); + int history_name_count = sizeof(history_names) / sizeof(char *) - 1; + + if (idx < short_names_count) +--- 5263,5269 ---- + { + static char_u compl[2] = { NUL, NUL }; + char *short_names = ":=@>?/"; +! int short_names_count = (int)STRLEN(short_names); + int history_name_count = sizeof(history_names) / sizeof(char *) - 1; + + if (idx < short_names_count) +*** ../vim-7.3.524/src/version.c 2012-05-18 21:53:29.000000000 +0200 +--- src/version.c 2012-05-25 11:01:51.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 525, + /**/ + +-- +For humans, honesty is a matter of degree. Engineers are always honest in +matters of technology and human relationships. That's why it's a good idea +to keep engineers away from customers, romantic interests, and other people +who can't handle the truth. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.526 b/7.3.526 new file mode 100644 index 0000000..036d401 --- /dev/null +++ b/7.3.526 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.526 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.526 +Problem: Confusing indenting for #ifdef. +Solution: Remove and add indent. (Elias Diem) +Files: src/normal.c + + +*** ../vim-7.3.525/src/normal.c 2012-04-30 18:18:43.000000000 +0200 +--- src/normal.c 2012-05-23 20:35:13.000000000 +0200 +*************** +*** 29,37 **** + static void set_vcount_ca __ARGS((cmdarg_T *cap, int *set_prevcount)); + #endif + static int +! # ifdef __BORLANDC__ +! _RTLENTRYF +! # endif + nv_compare __ARGS((const void *s1, const void *s2)); + static int find_command __ARGS((int cmdchar)); + static void op_colon __ARGS((oparg_T *oap)); +--- 29,37 ---- + static void set_vcount_ca __ARGS((cmdarg_T *cap, int *set_prevcount)); + #endif + static int +! #ifdef __BORLANDC__ +! _RTLENTRYF +! #endif + nv_compare __ARGS((const void *s1, const void *s2)); + static int find_command __ARGS((int cmdchar)); + static void op_colon __ARGS((oparg_T *oap)); +*** ../vim-7.3.525/src/version.c 2012-05-25 11:02:34.000000000 +0200 +--- src/version.c 2012-05-25 11:03:37.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 526, + /**/ + +-- +While it's true that many normal people whould prefer not to _date_ an +engineer, most normal people harbor an intense desire to _mate_ with them, +thus producing engineerlike children who will have high-paying jobs long +before losing their virginity. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.527 b/7.3.527 new file mode 100644 index 0000000..0c6af2b --- /dev/null +++ b/7.3.527 @@ -0,0 +1,59 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.527 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=latin1 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.527 +Problem: Clang complains about non-ASCII characters in a string. +Solution: Change to \x88 form. (Dominique Pelle) +Files: src/charset.c + + +*** ../vim-7.3.526/src/charset.c 2012-01-26 13:40:04.000000000 +0100 +--- src/charset.c 2012-05-25 11:49:58.000000000 +0200 +*************** +*** 1602,1611 **** + #define LATIN1LOWER 'l' + #define LATIN1UPPER 'U' + +- /* !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]%_'abcdefghijklmnopqrstuvwxyz{|}~ ����������������������������������������������������������������������������������������������� */ + static char_u latin1flags[257] = " UUUUUUUUUUUUUUUUUUUUUUUUUU llllllllllllllllllllllllll UUUUUUUUUUUUUUUUUUUUUUU UUUUUUUllllllllllllllllllllllll llllllll"; +! static char_u latin1upper[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~��������������������������������������������������������������������������������������������������������������������������������"; +! static char_u latin1lower[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������������������������������������������������������"; + + int + vim_islower(c) +--- 1602,1610 ---- + #define LATIN1LOWER 'l' + #define LATIN1UPPER 'U' + + static char_u latin1flags[257] = " UUUUUUUUUUUUUUUUUUUUUUUUUU llllllllllllllllllllllllll UUUUUUUUUUUUUUUUUUUUUUU UUUUUUUllllllllllllllllllllllll llllllll"; +! static char_u latin1upper[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xf7\xd8\xd9\xda\xdb\xdc\xdd\xde\xff"; +! static char_u latin1lower[257] = " !\"#$%&'()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xd7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + + int + vim_islower(c) +*** ../vim-7.3.526/src/version.c 2012-05-25 11:04:34.000000000 +0200 +--- src/version.c 2012-05-25 11:52:06.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 527, + /**/ + +-- +An alien life briefly visits earth. Just before departing it leaves a +message in the dust on the back of a white van. The world is shocked +and wants to know what it means. After months of studies the worlds +best linguistic scientists are able to decipher the message: "Wash me!". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.528 b/7.3.528 new file mode 100644 index 0000000..41084ad --- /dev/null +++ b/7.3.528 @@ -0,0 +1,171 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.528 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.528 +Problem: Crash when closing last window in a tab. (Alex Efros) +Solution: Use common code in close_last_window_tabpage(). (Christian + Brabandt) +Files: src/window.c + + +*** ../vim-7.3.527/src/window.c 2012-03-16 19:07:54.000000000 +0100 +--- src/window.c 2012-05-25 12:25:16.000000000 +0200 +*************** +*** 23,28 **** +--- 23,29 ---- + static void win_totop __ARGS((int size, int flags)); + static void win_equal_rec __ARGS((win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height)); + static int last_window __ARGS((void)); ++ static int close_last_window_tabpage __ARGS((win_T *win, int free_buf, tabpage_T *prev_curtab)); + static win_T *win_free_mem __ARGS((win_T *win, int *dirp, tabpage_T *tp)); + static frame_T *win_altframe __ARGS((win_T *win, tabpage_T *tp)); + static tabpage_T *alt_tabpage __ARGS((void)); +*************** +*** 2105,2110 **** +--- 2106,2147 ---- + } + + /* ++ * Close the possibly last window in a tab page. ++ * Returns TRUE when the window was closed already. ++ */ ++ static int ++ close_last_window_tabpage(win, free_buf, prev_curtab) ++ win_T *win; ++ int free_buf; ++ tabpage_T *prev_curtab; ++ { ++ if (firstwin == lastwin) ++ { ++ /* ++ * Closing the last window in a tab page. First go to another tab ++ * page and then close the window and the tab page. This avoids that ++ * curwin and curtab are invalid while we are freeing memory, they may ++ * be used in GUI events. ++ */ ++ goto_tabpage_tp(alt_tabpage()); ++ redraw_tabline = TRUE; ++ ++ /* Safety check: Autocommands may have closed the window when jumping ++ * to the other tab page. */ ++ if (valid_tabpage(prev_curtab) && prev_curtab->tp_firstwin == win) ++ { ++ int h = tabline_height(); ++ ++ win_close_othertab(win, free_buf, prev_curtab); ++ if (h != tabline_height()) ++ shell_new_rows(); ++ } ++ return TRUE; ++ } ++ return FALSE; ++ } ++ ++ /* + * Close window "win". Only works for the current tab page. + * If "free_buf" is TRUE related buffer may be unloaded. + * +*************** +*** 2143,2171 **** + } + #endif + +! /* +! * When closing the last window in a tab page first go to another tab +! * page and then close the window and the tab page. This avoids that +! * curwin and curtab are not invalid while we are freeing memory, they may +! * be used in GUI events. +! */ +! if (firstwin == lastwin) +! { +! goto_tabpage_tp(alt_tabpage()); +! redraw_tabline = TRUE; +! +! /* Safety check: Autocommands may have closed the window when jumping +! * to the other tab page. */ +! if (valid_tabpage(prev_curtab) && prev_curtab->tp_firstwin == win) +! { +! int h = tabline_height(); +! +! win_close_othertab(win, free_buf, prev_curtab); +! if (h != tabline_height()) +! shell_new_rows(); +! } +! return; +! } + + /* When closing the help window, try restoring a snapshot after closing + * the window. Otherwise clear the snapshot, it's now invalid. */ +--- 2180,2190 ---- + } + #endif + +! /* When closing the last window in a tab page first go to another tab page +! * and then close the window and the tab page to avoid that curwin and +! * curtab are invalid while we are freeing memory. */ +! if (close_last_window_tabpage(win, free_buf, prev_curtab)) +! return; + + /* When closing the help window, try restoring a snapshot after closing + * the window. Otherwise clear the snapshot, it's now invalid. */ +*************** +*** 2225,2231 **** + + /* 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) + return; + + /* Free the memory used for the window and get the window that received +--- 2244,2251 ---- + + /* 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 +! || close_last_window_tabpage(win, free_buf, prev_curtab)) + return; + + /* Free the memory used for the window and get the window that received +*************** +*** 2310,2316 **** + + /* + * Close window "win" in tab page "tp", which is not the current tab page. +! * This may be the last window ih that tab page and result in closing the tab, + * thus "tp" may become invalid! + * Caller must check if buffer is hidden and whether the tabline needs to be + * updated. +--- 2330,2336 ---- + + /* + * Close window "win" in tab page "tp", which is not the current tab page. +! * This may be the last window in that tab page and result in closing the tab, + * thus "tp" may become invalid! + * Caller must check if buffer is hidden and whether the tabline needs to be + * updated. +*** ../vim-7.3.527/src/version.c 2012-05-25 11:56:06.000000000 +0200 +--- src/version.c 2012-05-25 12:38:25.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 528, + /**/ + +-- +For society, it's probably a good thing that engineers value function over +appearance. For example, you wouldn't want engineers to build nuclear power +plants that only _look_ like they would keep all the radiation inside. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.529 b/7.3.529 new file mode 100644 index 0000000..386baf1 --- /dev/null +++ b/7.3.529 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.529 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.529 +Problem: Using a count before "v" and "V" does not work (Kikyous) +Solution: Make the count select that many characters or lines. (Christian + Brabandt) +Files: src/normal.c + + +*** ../vim-7.3.528/src/normal.c 2012-05-25 11:04:34.000000000 +0200 +--- src/normal.c 2012-05-25 13:12:06.000000000 +0200 +*************** +*** 7660,7672 **** + else /* start Visual mode */ + { + check_visual_highlight(); +! if (cap->count0) /* use previously selected part */ + { +! if (resel_VIsual_mode == NUL) /* there is none */ +! { +! beep_flush(); +! return; +! } + VIsual = curwin->w_cursor; + + VIsual_active = TRUE; +--- 7660,7668 ---- + else /* start Visual mode */ + { + check_visual_highlight(); +! if (cap->count0 > 0 && resel_VIsual_mode != NUL) + { +! /* use previously selected part */ + VIsual = curwin->w_cursor; + + VIsual_active = TRUE; +*************** +*** 7725,7730 **** +--- 7721,7736 ---- + /* start Select mode when 'selectmode' contains "cmd" */ + may_start_select('c'); + n_start_visual_mode(cap->cmdchar); ++ if (VIsual_mode != 'V' && *p_sel == 'e') ++ ++cap->count1; /* include one more char */ ++ if (cap->count0 > 0 && --cap->count1 > 0) ++ { ++ /* With a count select that many characters or lines. */ ++ if (VIsual_mode == 'v' || VIsual_mode == Ctrl_V) ++ nv_right(cap); ++ else if (VIsual_mode == 'V') ++ nv_down(cap); ++ } + } + } + } +*** ../vim-7.3.528/src/version.c 2012-05-25 12:38:57.000000000 +0200 +--- src/version.c 2012-05-25 12:59:58.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 529, + /**/ + +-- +Normal people believe that if it ain't broke, don't fix it. Engineers believe +that if it ain't broke, it doesn't have enough features yet. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.530 b/7.3.530 new file mode 100644 index 0000000..216117c --- /dev/null +++ b/7.3.530 @@ -0,0 +1,50 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.530 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.530 (after 7.3.520) +Problem: Gvim does not work when 'guioptions' includes "f". (Davido) +Solution: Call gui_mch_init_check() when running GUI in the foreground. + (Yasuhiro Matsumoto) +Files: src/gui.c + + +*** ../vim-7.3.529/src/gui.c 2012-05-18 17:03:13.000000000 +0200 +--- src/gui.c 2012-05-25 14:01:26.000000000 +0200 +*************** +*** 102,107 **** +--- 102,111 ---- + else + #endif + { ++ /* If there is 'f' in 'guioptions' and specify -g argument, ++ * gui_mch_init_check() was not called yet. */ ++ if (gui_mch_init_check() != OK) ++ exit(1); + gui_attempt_start(); + } + +*** ../vim-7.3.529/src/version.c 2012-05-25 13:12:33.000000000 +0200 +--- src/version.c 2012-05-25 14:05:46.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 530, + /**/ + +-- +I think that you'll agree that engineers are very effective in their social +interactions. It's the "normal" people who are nuts. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.531 b/7.3.531 new file mode 100644 index 0000000..652bdb7 --- /dev/null +++ b/7.3.531 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.531 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.531 (after 7.3.530) +Problem: GUI does not work on MS-Windows. +Solution: Add the missing #ifdef. (Patrick Avery) +Files: src/gui.c + + +*** ../vim-7.3.530/src/gui.c 2012-05-25 14:06:18.000000000 +0200 +--- src/gui.c 2012-05-27 00:34:51.000000000 +0200 +*************** +*** 102,111 **** +--- 102,113 ---- + else + #endif + { ++ #ifdef FEAT_GUI_GTK + /* If there is 'f' in 'guioptions' and specify -g argument, + * gui_mch_init_check() was not called yet. */ + if (gui_mch_init_check() != OK) + exit(1); ++ #endif + gui_attempt_start(); + } + +*** ../vim-7.3.530/src/version.c 2012-05-25 14:06:18.000000000 +0200 +--- src/version.c 2012-05-27 00:37:33.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 531, + /**/ + +-- +I learned the customs and mannerisms of engineers by observing them, much the +way Jane Goodall learned about the great apes, but without the hassle of +grooming. + (Scott Adams - The Dilbert principle) + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.532 b/7.3.532 new file mode 100644 index 0000000..071cab3 --- /dev/null +++ b/7.3.532 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.532 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.532 +Problem: Compiler warning from Clang. +Solution: Use a different way to point inside a string. (Dominique Pelle) +Files: src/syntax.c + + +*** ../vim-7.3.531/src/syntax.c 2012-03-23 16:25:13.000000000 +0100 +--- src/syntax.c 2012-06-01 13:13:58.000000000 +0200 +*************** +*** 9476,9482 **** + int cnt; + int attr; + { +! msg_puts_attr((char_u *)("N \bI \b! \b" + cnt / 11), attr); + msg_clr_eos(); + out_flush(); + ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE); +--- 9476,9482 ---- + int cnt; + int attr; + { +! msg_puts_attr((char_u *)&("N \bI \b! \b"[cnt / 11]), attr); + msg_clr_eos(); + out_flush(); + ui_delay(cnt == 99 ? 40L : (long)cnt * 50L, FALSE); +*** ../vim-7.3.531/src/version.c 2012-05-27 00:37:45.000000000 +0200 +--- src/version.c 2012-06-01 13:14:51.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 532, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +8. You spend half of the plane trip with your laptop on your lap...and your + child in the overhead compartment. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.533 b/7.3.533 new file mode 100644 index 0000000..1d71c8d --- /dev/null +++ b/7.3.533 @@ -0,0 +1,46 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.533 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.533 +Problem: Memory leak when writing undo file. +Solution: Free the ACL. (Dominique Pelle) +Files: src/undo.c + + +*** ../vim-7.3.532/src/undo.c 2011-12-08 15:14:04.000000000 +0100 +--- src/undo.c 2012-06-01 13:38:42.000000000 +0200 +*************** +*** 1535,1540 **** +--- 1535,1541 ---- + /* For systems that support ACL: get the ACL from the original file. */ + acl = mch_get_acl(buf->b_ffname); + mch_set_acl(file_name, acl); ++ mch_free_acl(acl); + } + #endif + +*** ../vim-7.3.532/src/version.c 2012-06-01 13:18:48.000000000 +0200 +--- src/version.c 2012-06-01 13:39:16.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 533, + /**/ + +-- +"How is your new girlfriend?" +"90-60-90 man!" +"What, pale purple?" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.534 b/7.3.534 new file mode 100644 index 0000000..618d6e4 --- /dev/null +++ b/7.3.534 @@ -0,0 +1,101 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.534 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.534 (after 7.3.461) +Problem: When using an InsertCharPre autocommand autoindent fails. +Solution: Proper handling of v:char. (Alexey Radkov) +Files: src/edit.c + + +*** ../vim-7.3.533/src/edit.c 2012-05-18 16:35:17.000000000 +0200 +--- src/edit.c 2012-06-01 14:41:06.000000000 +0200 +*************** +*** 10108,10129 **** + do_insert_char_pre(c) + int c; + { +! char_u *res; + + /* Return quickly when there is nothing to do. */ + if (!has_insertcharpre()) + return NULL; + + /* Lock the text to avoid weird things from happening. */ + ++textlock; +! set_vim_var_char(c); /* set v:char */ + + if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, FALSE, curbuf)) +! /* Get the new value of v:char. It may be empty or more than one +! * character. */ +! res = vim_strsave(get_vim_var_str(VV_CHAR)); +! else +! res = NULL; + + set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */ + --textlock; +--- 10108,10147 ---- + do_insert_char_pre(c) + int c; + { +! char_u *res; +! #ifdef FEAT_MBYTE +! char_u buf[MB_MAXBYTES + 1]; +! #else +! char_u buf[2]; +! #endif + + /* Return quickly when there is nothing to do. */ + if (!has_insertcharpre()) + return NULL; + ++ #ifdef FEAT_MBYTE ++ if (has_mbyte) ++ buf[(*mb_char2bytes)(c, buf)] = NUL; ++ else ++ #endif ++ { ++ buf[0] = c; ++ buf[1] = NUL; ++ } ++ + /* Lock the text to avoid weird things from happening. */ + ++textlock; +! set_vim_var_string(VV_CHAR, buf, -1); /* set v:char */ + ++ res = NULL; + if (apply_autocmds(EVENT_INSERTCHARPRE, NULL, NULL, FALSE, curbuf)) +! { +! /* Get the value of v:char. It may be empty or more than one +! * character. Only use it when changed, otherwise continue with the +! * original character to avoid breaking autoindent. */ +! if (STRCMP(buf, get_vim_var_str(VV_CHAR)) != 0) +! res = vim_strsave(get_vim_var_str(VV_CHAR)); +! } + + set_vim_var_string(VV_CHAR, NULL, -1); /* clear v:char */ + --textlock; +*** ../vim-7.3.533/src/version.c 2012-06-01 13:46:06.000000000 +0200 +--- src/version.c 2012-06-01 14:42:19.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 534, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +11. You find yourself typing "com" after every period when using a word + processor.com + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.535 b/7.3.535 new file mode 100644 index 0000000..e7f0f8a --- /dev/null +++ b/7.3.535 @@ -0,0 +1,356 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.535 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.535 +Problem: Many #ifdefs for MB_MAXBYTES. +Solution: Also define MB_MAXBYTES without the +multi_byte feature. Fix + places where the buffer didn't include space for a NUL byte. +Files: src/arabic.c, src/edit.c, src/eval.c, src/getchar.c, src/mbyte.c, + src/misc1.c, src/screen.c, src/spell.c, src/vim.h + + +*** ../vim-7.3.534/src/arabic.c 2010-08-15 21:57:28.000000000 +0200 +--- src/arabic.c 2012-06-01 14:59:37.000000000 +0200 +*************** +*** 1066,1072 **** + + if (curr_c != c && ccp != NULL) + { +! char_u buf[MB_MAXBYTES]; + + /* Update the first byte of the character. */ + (*mb_char2bytes)(curr_c, buf); +--- 1066,1072 ---- + + if (curr_c != c && ccp != NULL) + { +! char_u buf[MB_MAXBYTES + 1]; + + /* Update the first byte of the character. */ + (*mb_char2bytes)(curr_c, buf); +*** ../vim-7.3.534/src/edit.c 2012-06-01 14:57:47.000000000 +0200 +--- src/edit.c 2012-06-01 15:01:49.000000000 +0200 +*************** +*** 1648,1658 **** + #define PC_STATUS_RIGHT 1 /* right halve of double-wide char */ + #define PC_STATUS_LEFT 2 /* left halve of double-wide char */ + #define PC_STATUS_SET 3 /* pc_bytes was filled */ +- #ifdef FEAT_MBYTE + static char_u pc_bytes[MB_MAXBYTES + 1]; /* saved bytes */ +- #else +- static char_u pc_bytes[2]; /* saved bytes */ +- #endif + static int pc_attr; + static int pc_row; + static int pc_col; +--- 1648,1654 ---- +*************** +*** 6819,6829 **** + char_u *s; + + vim_free(last_insert); +- #ifdef FEAT_MBYTE + last_insert = alloc(MB_MAXBYTES * 3 + 5); +- #else +- last_insert = alloc(6); +- #endif + if (last_insert != NULL) + { + s = last_insert; +--- 6815,6821 ---- +*************** +*** 6861,6867 **** + char_u *s; + { + #ifdef FEAT_MBYTE +! char_u temp[MB_MAXBYTES]; + int i; + int len; + +--- 6853,6859 ---- + char_u *s; + { + #ifdef FEAT_MBYTE +! char_u temp[MB_MAXBYTES + 1]; + int i; + int len; + +*************** +*** 7423,7429 **** + int cc; + { + int n; +! char_u buf[MB_MAXBYTES]; + int i; + int c; + +--- 7415,7421 ---- + int cc; + { + int n; +! char_u buf[MB_MAXBYTES + 1]; + int i; + int c; + +*************** +*** 10109,10119 **** + int c; + { + char_u *res; +- #ifdef FEAT_MBYTE + char_u buf[MB_MAXBYTES + 1]; +- #else +- char_u buf[2]; +- #endif + + /* Return quickly when there is nothing to do. */ + if (!has_insertcharpre()) +--- 10101,10107 ---- +*** ../vim-7.3.534/src/eval.c 2012-05-18 18:34:15.000000000 +0200 +--- src/eval.c 2012-06-01 15:02:08.000000000 +0200 +*************** +*** 19170,19180 **** + set_vim_var_char(c) + int c; + { +! #ifdef FEAT_MBYTE +! char_u buf[MB_MAXBYTES]; +! #else +! char_u buf[2]; +! #endif + + #ifdef FEAT_MBYTE + if (has_mbyte) +--- 19170,19176 ---- + set_vim_var_char(c) + int c; + { +! char_u buf[MB_MAXBYTES + 1]; + + #ifdef FEAT_MBYTE + if (has_mbyte) +*** ../vim-7.3.534/src/getchar.c 2012-04-05 16:07:01.000000000 +0200 +--- src/getchar.c 2012-06-01 15:03:51.000000000 +0200 +*************** +*** 723,729 **** + int c; + #ifdef FEAT_MBYTE + int n; +! char_u buf[MB_MAXBYTES]; + int i; + #endif + +--- 723,729 ---- + int c; + #ifdef FEAT_MBYTE + int n; +! char_u buf[MB_MAXBYTES + 1]; + int i; + #endif + +*************** +*** 1072,1078 **** + int c; + { + #ifdef FEAT_MBYTE +! char_u buf[MB_MAXBYTES]; + #else + char_u buf[4]; + #endif +--- 1072,1078 ---- + int c; + { + #ifdef FEAT_MBYTE +! char_u buf[MB_MAXBYTES + 1]; + #else + char_u buf[4]; + #endif +*************** +*** 1547,1553 **** + int c, c2; + #ifdef FEAT_MBYTE + int n; +! char_u buf[MB_MAXBYTES]; + int i; + #endif + +--- 1547,1553 ---- + int c, c2; + #ifdef FEAT_MBYTE + int n; +! char_u buf[MB_MAXBYTES + 1]; + int i; + #endif + +*************** +*** 4335,4345 **** + int scol; /* starting column of the abbr. */ + int j; + char_u *s; +- #ifdef FEAT_MBYTE + char_u tb[MB_MAXBYTES + 4]; +- #else +- char_u tb[4]; +- #endif + mapblock_T *mp; + #ifdef FEAT_LOCALMAP + mapblock_T *mp2; +--- 4335,4341 ---- +*** ../vim-7.3.534/src/mbyte.c 2012-03-07 19:38:52.000000000 +0100 +--- src/mbyte.c 2012-06-01 15:04:27.000000000 +0200 +*************** +*** 708,714 **** + */ + n = (i & 0x80) ? 2 : 1; + # else +! char buf[MB_MAXBYTES]; + # ifdef X_LOCALE + # ifndef mblen + # define mblen _Xmblen +--- 708,714 ---- + */ + n = (i & 0x80) ? 2 : 1; + # else +! char buf[MB_MAXBYTES + 1]; + # ifdef X_LOCALE + # ifndef mblen + # define mblen _Xmblen +*************** +*** 1953,1959 **** + /* + * Convert the character at screen position "off" to a sequence of bytes. + * Includes the composing characters. +! * "buf" must at least have the length MB_MAXBYTES. + * Only to be used when ScreenLinesUC[off] != 0. + * Returns the produced number of bytes. + */ +--- 1953,1959 ---- + /* + * Convert the character at screen position "off" to a sequence of bytes. + * Includes the composing characters. +! * "buf" must at least have the length MB_MAXBYTES + 1. + * Only to be used when ScreenLinesUC[off] != 0. + * Returns the produced number of bytes. + */ +*** ../vim-7.3.534/src/misc1.c 2012-04-30 21:09:38.000000000 +0200 +--- src/misc1.c 2012-06-01 15:04:56.000000000 +0200 +*************** +*** 1932,1938 **** + int c; + { + #if defined(FEAT_MBYTE) || defined(PROTO) +! char_u buf[MB_MAXBYTES]; + int n; + + n = (*mb_char2bytes)(c, buf); +--- 1932,1938 ---- + int c; + { + #if defined(FEAT_MBYTE) || defined(PROTO) +! char_u buf[MB_MAXBYTES + 1]; + int n; + + n = (*mb_char2bytes)(c, buf); +*** ../vim-7.3.534/src/screen.c 2012-03-23 16:25:13.000000000 +0100 +--- src/screen.c 2012-06-01 15:06:03.000000000 +0200 +*************** +*** 6621,6636 **** + int row, col; + int attr; + { +- #ifdef FEAT_MBYTE + char_u buf[MB_MAXBYTES + 1]; + +! buf[(*mb_char2bytes)(c, buf)] = NUL; +! #else +! char_u buf[2]; +! +! buf[0] = c; +! buf[1] = NUL; + #endif + screen_puts(buf, row, col, attr); + } + +--- 6621,6637 ---- + int row, col; + int attr; + { + char_u buf[MB_MAXBYTES + 1]; + +! #ifdef FEAT_MBYTE +! if (has_mbyte) +! buf[(*mb_char2bytes)(c, buf)] = NUL; +! else + #endif ++ { ++ buf[0] = c; ++ buf[1] = NUL; ++ } + screen_puts(buf, row, col, attr); + } + +*** ../vim-7.3.534/src/spell.c 2012-05-18 18:07:57.000000000 +0200 +--- src/spell.c 2012-06-01 15:06:30.000000000 +0200 +*************** +*** 13694,13700 **** + { + int m1, m2; + #ifdef FEAT_MBYTE +! char_u buf[MB_MAXBYTES]; + hashitem_T *hi; + + if (c1 >= 256) +--- 13694,13700 ---- + { + int m1, m2; + #ifdef FEAT_MBYTE +! char_u buf[MB_MAXBYTES + 1]; + hashitem_T *hi; + + if (c1 >= 256) +*** ../vim-7.3.534/src/vim.h 2012-04-30 18:48:38.000000000 +0200 +--- src/vim.h 2012-06-01 14:59:28.000000000 +0200 +*************** +*** 1703,1708 **** +--- 1703,1710 ---- + * character of up to 6 bytes, or one 16-bit character of up to three bytes + * plus six following composing characters of three bytes each. */ + # define MB_MAXBYTES 21 ++ #else ++ # define MB_MAXBYTES 1 + #endif + + #if (defined(FEAT_PROFILE) || defined(FEAT_RELTIME)) && !defined(PROTO) +*************** +*** 2017,2022 **** +--- 2019,2025 ---- + #pragma warning(disable : 4312) + #endif + ++ /* Note: a NULL argument for vim_realloc() is not portable, don't use it. */ + #if defined(MEM_PROFILE) + # define vim_realloc(ptr, size) mem_realloc((ptr), (size)) + #else +*** ../vim-7.3.534/src/version.c 2012-06-01 14:57:47.000000000 +0200 +--- src/version.c 2012-06-01 15:08:20.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 535, + /**/ + +-- +Me? A skeptic? I trust you have proof. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.536 b/7.3.536 new file mode 100644 index 0000000..e0c3f76 --- /dev/null +++ b/7.3.536 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.536 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.536 +Problem: When spell checking the German sharp s is not seen as a word + character. (Aexl Bender) +Solution: In utf_islower() return true for the sharp s. Note: also need + updated spell file for this to take effect. +Files: src/mbyte.c + + +*** ../vim-7.3.535/src/mbyte.c 2012-06-01 15:20:49.000000000 +0200 +--- src/mbyte.c 2012-06-01 16:50:41.000000000 +0200 +*************** +*** 2949,2955 **** + { + {0x61,0x7a,1,-32}, + {0xb5,0xb5,-1,743}, +! {0xe0,0xf6,1,-32}, + {0xf8,0xfe,1,-32}, + {0xff,0xff,-1,121}, + {0x101,0x12f,2,-1}, +--- 2949,2955 ---- + { + {0x61,0x7a,1,-32}, + {0xb5,0xb5,-1,743}, +! {0xe0,0xf6,1,-32}, /* 0xdf (German sharp s) is not upper-cased */ + {0xf8,0xfe,1,-32}, + {0xff,0xff,-1,121}, + {0x101,0x12f,2,-1}, +*************** +*** 3129,3135 **** + utf_islower(a) + int a; + { +! return (utf_toupper(a) != a); + } + + /* +--- 3129,3136 ---- + utf_islower(a) + int a; + { +! /* German sharp s is lower case but has no upper case equivalent. */ +! return (utf_toupper(a) != a) || a == 0xdf; + } + + /* +*** ../vim-7.3.535/src/version.c 2012-06-01 15:20:49.000000000 +0200 +--- src/version.c 2012-06-01 17:45:17.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 536, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +16. You step out of your room and realize that your parents have moved and + you don't have a clue when it happened. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.537 b/7.3.537 new file mode 100644 index 0000000..76b41c8 --- /dev/null +++ b/7.3.537 @@ -0,0 +1,47 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.537 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.537 +Problem: Unecessary call to init_spell_chartab(). +Solution: Delete the call. +Files: src/spell.c + + +*** ../vim-7.3.536/src/spell.c 2012-06-01 15:20:49.000000000 +0200 +--- src/spell.c 2012-06-01 17:49:44.000000000 +0200 +*************** +*** 4721,4728 **** + int_wordlist = NULL; + } + +- init_spell_chartab(); +- + vim_free(repl_to); + repl_to = NULL; + vim_free(repl_from); +--- 4721,4726 ---- +*** ../vim-7.3.536/src/version.c 2012-06-01 17:46:52.000000000 +0200 +--- src/version.c 2012-06-01 17:49:08.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 537, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +17. You turn on your intercom when leaving the room so you can hear if new + e-mail arrives. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.538 b/7.3.538 new file mode 100644 index 0000000..947fa65 --- /dev/null +++ b/7.3.538 @@ -0,0 +1,321 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.538 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.538 +Problem: 'efm' does not handle Tabs in pointer lines. +Solution: Add Tab support. Improve tests. (Lech Lorens) +Files: src/quickfix.c, src/testdir/test10.in, src/testdir/test10.ok + + +*** ../vim-7.3.537/src/quickfix.c 2012-04-25 18:57:17.000000000 +0200 +--- src/quickfix.c 2012-06-01 18:24:07.000000000 +0200 +*************** +*** 247,253 **** + {'t', "."}, + {'m', ".\\+"}, + {'r', ".*"}, +! {'p', "[- .]*"}, + {'v', "\\d\\+"}, + {'s', ".\\+"} + }; +--- 247,253 ---- + {'t', "."}, + {'m', ".\\+"}, + {'r', ".*"}, +! {'p', "[- .]*"}, + {'v', "\\d\\+"}, + {'s', ".\\+"} + }; +*************** +*** 677,687 **** + } + if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */ + { + if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) + continue; +! col = (int)(regmatch.endp[i] - regmatch.startp[i] + 1); +! if (*((char_u *)regmatch.startp[i]) != TAB) +! use_viscol = TRUE; + } + if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */ + { +--- 677,699 ---- + } + if ((i = (int)fmt_ptr->addr[7]) > 0) /* %p */ + { ++ char_u *match_ptr; ++ + if (regmatch.startp[i] == NULL || regmatch.endp[i] == NULL) + continue; +! col = 0; +! for (match_ptr = regmatch.startp[i]; +! match_ptr != regmatch.endp[i]; ++match_ptr) +! { +! ++col; +! if (*match_ptr == TAB) +! { +! col += 7; +! col -= col % 8; +! } +! } +! ++col; +! use_viscol = TRUE; + } + if ((i = (int)fmt_ptr->addr[8]) > 0) /* %v */ + { +*** ../vim-7.3.537/src/testdir/test10.in 2011-08-10 18:36:49.000000000 +0200 +--- src/testdir/test10.in 2012-06-01 18:22:40.000000000 +0200 +*************** +*** 8,48 **** + :7/start of errorfile/,/end of errorfile/w! Xerrorfile1 + :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2 + :/start of testfile/,/end of testfile/w! Xtestfile + :cf Xerrorfile2 + :clast + :copen + :let a=w:quickfix_title + :wincmd p +! gR=a  + :cf Xerrorfile1 +! rA + :cn +! rB + :cn +! rC + :cn +! rD + :cn +! rE + :cn + :wincmd w + :let a=w:quickfix_title + :wincmd p +! gR=a  + :w! test.out " Write contents of this file + :qa! + ENDTEST + + start of errorfile + "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set. +! "Xtestfile", line 7 col 19; this is an error + gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c +! Xtestfile:13: parse error before `asd' + make: *** [vim] Error 1 +! in file "Xtestfile" linenr 16: there is an error + + 2 returned +! "Xtestfile", linenr 19: yet another problem + + Does anyone know what is the problem and how to correction it? + "Xtestfile", line 21 col 9: What is the title of the quickfix window? +--- 8,88 ---- + :7/start of errorfile/,/end of errorfile/w! Xerrorfile1 + :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2 + :/start of testfile/,/end of testfile/w! Xtestfile ++ :set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m ++ :set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m + :cf Xerrorfile2 + :clast + :copen + :let a=w:quickfix_title + :wincmd p +! lgR=a  + :cf Xerrorfile1 +! grA + :cn +! gRLINE 6, COL 19 + :cn +! gRNO COLUMN SPECIFIED + :cn +! gRAGAIN NO COLUMN + :cn +! gRCOL 1 + :cn ++ gRCOL 2 ++ :cn ++ gRCOL 10 ++ :cn ++ gRVCOL 10 ++ :cn ++ grI ++ :cn ++ gR. SPACE POINTER ++ :cn ++ gR. DOT POINTER ++ :cn ++ gR. DASH POINTER ++ :cn ++ gR. TAB-SPACE POINTER ++ :clast ++ :cprev ++ :cprev + :wincmd w + :let a=w:quickfix_title + :wincmd p +! lgR=a  + :w! test.out " Write contents of this file + :qa! + ENDTEST + + start of errorfile + "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set. +! "Xtestfile", line 6 col 19; this is an error + gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c +! Xtestfile:9: parse error before `asd' + make: *** [vim] Error 1 +! in file "Xtestfile" linenr 10: there is an error + + 2 returned +! "Xtestfile", line 11 col 1; this is an error +! "Xtestfile", line 12 col 2; this is another error +! "Xtestfile", line 14:10; this is an error in column 10 +! =Xtestfile=, line 15:10; this is another error, but in vcol 10 this time +! "Xtestfile", linenr 16: yet another problem +! Error in "Xtestfile" at line 17: +! x should be a dot +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17 +! ^ +! Error in "Xtestfile" at line 18: +! x should be a dot +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18 +! .............^ +! Error in "Xtestfile" at line 19: +! x should be a dot +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19 +! --------------^ +! Error in "Xtestfile" at line 20: +! x should be a dot +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20 +! ^ + + Does anyone know what is the problem and how to correction it? + "Xtestfile", line 21 col 9: What is the title of the quickfix window? +*************** +*** 50,74 **** + end of errorfile + + start of testfile +! line 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 8 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + end of testfile +--- 90,114 ---- + end of errorfile + + start of testfile +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 4 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 6 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 7 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 8 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 9 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 10 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 11 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 12 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 13 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 14 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 15 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 16 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 22 + end of testfile +*** ../vim-7.3.537/src/testdir/test10.ok 2011-08-10 18:36:49.000000000 +0200 +--- src/testdir/test10.ok 2012-06-01 18:22:40.000000000 +0200 +*************** +*** 1,23 **** + start of testfile +! line 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 4 xxxAxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 7 xxxxxxxxxxBxxxxxxxxxxxxxxxxxxx +! line 8 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! Cine 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! Dine 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! Eine 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +! line 21 :cf Xerrorfile1xxxxxxxxxxxxxxx +! line 22 :cf Xerrorfile2xxxxxxxxxxxxxxx + end of testfile +--- 1,23 ---- + start of testfile +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3 +! xxxxxxxxxxAxxxxxxxxxxxxxxxxxxx line 4 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5 +! xxxxxxxxxxxxxxxxxLINE 6, COL 19 line 6 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 7 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 8 +! NO COLUMN SPECIFIEDxxxxxxxxxxx line 9 +! AGAIN NO COLUMNxxxxxxxxxxxxxxx line 10 +! COL 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 11 +! COL 2xxxxxxxxxxxxxxxxxxxxxxxxx line 12 +! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 13 +! xxxxxxxxCOL 10xxxxxxxxxxxxxxxx line 14 +! xVCOL 10xxxxxxxxxxxxxxxxxxxxxx line 15 +! Ixxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 16 +! xxxx. SPACE POINTERxxxxxxxxxxx line 17 +! xxxxx. DOT POINTERxxxxxxxxxxxx line 18 +! xxxxxx. DASH POINTERxxxxxxxxxx line 19 +! xxxxxxx. TAB-SPACE POINTERxxxx line 20 +! xxxxxxxx:cf Xerrorfile1xxxxxxx line 21 +! xxxxxxxx:cf Xerrorfile2xxxxxxx line 22 + end of testfile +*** ../vim-7.3.537/src/version.c 2012-06-01 17:49:51.000000000 +0200 +--- src/version.c 2012-06-01 18:22:27.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 538, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +18. Your wife drapes a blond wig over your monitor to remind you of what she + looks like. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.539 b/7.3.539 new file mode 100644 index 0000000..267c076 --- /dev/null +++ b/7.3.539 @@ -0,0 +1,51 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.539 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.539 +Problem: Redrawing a character on the command line does not work properly + for multi-byte charactes. +Solution: Count the number of bytes in a character. (Yukihiro Nakadaira) +Files: src/ex_getln.c + + +*** ../vim-7.3.538/src/ex_getln.c 2012-05-25 11:02:34.000000000 +0200 +--- src/ex_getln.c 2012-06-06 11:50:37.000000000 +0200 +*************** +*** 2764,2769 **** +--- 2764,2774 ---- + msg_no_more = TRUE; + if (ccline.cmdlen == ccline.cmdpos) + msg_putchar(' '); ++ #ifdef FEAT_MBYTE ++ else if (has_mbyte) ++ draw_cmdline(ccline.cmdpos, ++ (*mb_ptr2len)(ccline.cmdbuff + ccline.cmdpos)); ++ #endif + else + draw_cmdline(ccline.cmdpos, 1); + msg_no_more = FALSE; +*** ../vim-7.3.538/src/version.c 2012-06-01 18:34:37.000000000 +0200 +--- src/version.c 2012-06-06 12:02:45.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 539, + /**/ + +-- +If they don't keep on exercising their lips, he thought, their brains +start working. + -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.540 b/7.3.540 new file mode 100644 index 0000000..6793eb4 --- /dev/null +++ b/7.3.540 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.540 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.540 +Problem: Cursor is left on the text instead of the command line. +Solution: Don't call setcursor() in command line mode. +Files: src/getchar.c + + +*** ../vim-7.3.539/src/getchar.c 2012-06-01 15:20:49.000000000 +0200 +--- src/getchar.c 2012-06-06 11:58:05.000000000 +0200 +*************** +*** 2819,2825 **** + edit_unputchar(); + if (State & CMDLINE) + unputcmdline(); +! setcursor(); /* put cursor back where it belongs */ + } + + if (c < 0) +--- 2819,2826 ---- + edit_unputchar(); + if (State & CMDLINE) + unputcmdline(); +! else +! setcursor(); /* put cursor back where it belongs */ + } + + if (c < 0) +*** ../vim-7.3.539/src/version.c 2012-06-06 12:02:57.000000000 +0200 +--- src/version.c 2012-06-06 12:05:22.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 540, + /**/ + +-- +"Making it up? Why should I want to make anything up? Life's bad enough +as it is without wanting to invent any more of it." + -- Marvin, the Paranoid Android in Douglas Adams' + "The Hitchhiker's Guide to the Galaxy" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.541 b/7.3.541 new file mode 100644 index 0000000..133b82d --- /dev/null +++ b/7.3.541 @@ -0,0 +1,1090 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.541 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.541 +Problem: When joining lines comment leaders need to be removed manually. +Solution: Add the 'j' flag to 'formatoptions'. (Lech Lorens) +Files: runtime/doc/change.txt, src/edit.c, src/ex_docmd.c, src/misc1.c, + src/normal.c, src/ops.c, src/option.h, src/proto/misc1.pro, + src/proto/ops.pro, src/search.c, src/testdir/test29.in, + src/testdir/test29.ok + + +*** ../vim-7.3.540/runtime/doc/change.txt 2011-05-05 14:26:37.000000000 +0200 +--- runtime/doc/change.txt 2012-06-06 13:05:04.000000000 +0200 +*************** +*** 1495,1500 **** +--- 1522,1533 ---- + characters. Overruled by the 'M' flag. + 1 Don't break a line after a one-letter word. It's broken before it + instead (if possible). ++ j Where it makes sense, remove a comment leader when joining lines. For ++ example, joining: ++ int i; // the index ~ ++ // in the list ~ ++ Becomes: ++ int i; // the index in the list ~ + + + With 't' and 'c' you can specify when Vim performs auto-wrapping: +*** ../vim-7.3.540/src/edit.c 2012-06-01 15:20:49.000000000 +0200 +--- src/edit.c 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 5847,5853 **** + * Need to remove existing (middle) comment leader and insert end + * comment leader. First, check what comment leader we can find. + */ +! i = get_leader_len(line = ml_get_curline(), &p, FALSE); + if (i > 0 && vim_strchr(p, COM_MIDDLE) != NULL) /* Just checking */ + { + /* Skip middle-comment string */ +--- 5847,5853 ---- + * Need to remove existing (middle) comment leader and insert end + * comment leader. First, check what comment leader we can find. + */ +! i = get_leader_len(line = ml_get_curline(), &p, FALSE, TRUE); + if (i > 0 && vim_strchr(p, COM_MIDDLE) != NULL) /* Just checking */ + { + /* Skip middle-comment string */ +*************** +*** 6085,6091 **** + + /* Don't break until after the comment leader */ + if (do_comments) +! leader_len = get_leader_len(ml_get_curline(), NULL, FALSE); + else + leader_len = 0; + +--- 6085,6091 ---- + + /* Don't break until after the comment leader */ + if (do_comments) +! leader_len = get_leader_len(ml_get_curline(), NULL, FALSE, TRUE); + else + leader_len = 0; + +*************** +*** 6411,6417 **** + /* With the 'c' flag in 'formatoptions' and 't' missing: only format + * comments. */ + if (has_format_option(FO_WRAP_COMS) && !has_format_option(FO_WRAP) +! && get_leader_len(old, NULL, FALSE) == 0) + return; + #endif + +--- 6411,6417 ---- + /* With the 'c' flag in 'formatoptions' and 't' missing: only format + * comments. */ + if (has_format_option(FO_WRAP_COMS) && !has_format_option(FO_WRAP) +! && get_leader_len(old, NULL, FALSE, TRUE) == 0) + return; + #endif + +*************** +*** 8565,8571 **** + { + temp = curwin->w_cursor.col; + if (!can_bs(BS_EOL) /* only if "eol" included */ +! || do_join(2, FALSE, TRUE) == FAIL) + vim_beep(); + else + curwin->w_cursor.col = temp; +--- 8565,8571 ---- + { + temp = curwin->w_cursor.col; + if (!can_bs(BS_EOL) /* only if "eol" included */ +! || do_join(2, FALSE, TRUE, FALSE) == FAIL) + vim_beep(); + else + curwin->w_cursor.col = temp; +*************** +*** 8746,8752 **** + ptr[len - 1] = NUL; + } + +! (void)do_join(2, FALSE, FALSE); + if (temp == NUL && gchar_cursor() != NUL) + inc_cursor(); + } +--- 8746,8752 ---- + ptr[len - 1] = NUL; + } + +! (void)do_join(2, FALSE, FALSE, FALSE); + if (temp == NUL && gchar_cursor() != NUL) + inc_cursor(); + } +*** ../vim-7.3.540/src/ex_docmd.c 2012-04-30 18:48:38.000000000 +0200 +--- src/ex_docmd.c 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 8545,8551 **** + } + ++eap->line2; + } +! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE); + beginline(BL_WHITE | BL_FIX); + ex_may_print(eap); + } +--- 8545,8551 ---- + } + ++eap->line2; + } +! (void)do_join(eap->line2 - eap->line1 + 1, !eap->forceit, TRUE, TRUE); + beginline(BL_WHITE | BL_FIX); + ex_may_print(eap); + } +*** ../vim-7.3.540/src/misc1.c 2012-06-01 15:20:49.000000000 +0200 +--- src/misc1.c 2012-06-06 13:27:32.000000000 +0200 +*************** +*** 671,677 **** + ptr = saved_line; + # ifdef FEAT_COMMENTS + if (flags & OPENLINE_DO_COM) +! lead_len = get_leader_len(ptr, NULL, FALSE); + else + lead_len = 0; + # endif +--- 671,677 ---- + ptr = saved_line; + # ifdef FEAT_COMMENTS + if (flags & OPENLINE_DO_COM) +! lead_len = get_leader_len(ptr, NULL, FALSE, TRUE); + else + lead_len = 0; + # endif +*************** +*** 693,699 **** + } + # ifdef FEAT_COMMENTS + if (flags & OPENLINE_DO_COM) +! lead_len = get_leader_len(ptr, NULL, FALSE); + else + lead_len = 0; + if (lead_len > 0) +--- 693,699 ---- + } + # ifdef FEAT_COMMENTS + if (flags & OPENLINE_DO_COM) +! lead_len = get_leader_len(ptr, NULL, FALSE, TRUE); + else + lead_len = 0; + if (lead_len > 0) +*************** +*** 836,842 **** + */ + end_comment_pending = NUL; + if (flags & OPENLINE_DO_COM) +! lead_len = get_leader_len(saved_line, &lead_flags, dir == BACKWARD); + else + lead_len = 0; + if (lead_len > 0) +--- 836,842 ---- + */ + end_comment_pending = NUL; + if (flags & OPENLINE_DO_COM) +! lead_len = get_leader_len(saved_line, &lead_flags, dir == BACKWARD, TRUE); + else + lead_len = 0; + if (lead_len > 0) +*************** +*** 1548,1561 **** + * When "flags" is not NULL, it is set to point to the flags of the recognized + * comment leader. + * "backward" must be true for the "O" command. + */ + int +! get_leader_len(line, flags, backward) + char_u *line; + char_u **flags; + int backward; + { + int i, j; + int got_com = FALSE; + int found_one; + char_u part_buf[COM_MAX_LEN]; /* buffer for one option part */ +--- 1548,1565 ---- + * When "flags" is not NULL, it is set to point to the flags of the recognized + * comment leader. + * "backward" must be true for the "O" command. ++ * If "include_space" is set, include trailing whitespace while calculating the ++ * length. + */ + int +! get_leader_len(line, flags, backward, include_space) + char_u *line; + char_u **flags; + int backward; ++ int include_space; + { + int i, j; ++ int result; + int got_com = FALSE; + int found_one; + char_u part_buf[COM_MAX_LEN]; /* buffer for one option part */ +*************** +*** 1565,1571 **** + char_u *prev_list; + char_u *saved_flags = NULL; + +! i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ + ++i; + +--- 1569,1575 ---- + char_u *prev_list; + char_u *saved_flags = NULL; + +! result = i = 0; + while (vim_iswhite(line[i])) /* leading white space is ignored */ + ++i; + +*************** +*** 1668,1684 **** + if (!found_one) + break; + + /* Include any trailing white space. */ + while (vim_iswhite(line[i])) + ++i; + + /* If this comment doesn't nest, stop here. */ + got_com = TRUE; + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } + +! return (got_com ? i : 0); + } + #endif + +--- 1672,1838 ---- + if (!found_one) + break; + ++ result = i; ++ + /* Include any trailing white space. */ + while (vim_iswhite(line[i])) + ++i; + ++ if (include_space) ++ result = i; ++ + /* If this comment doesn't nest, stop here. */ + got_com = TRUE; + if (vim_strchr(part_buf, COM_NEST) == NULL) + break; + } ++ return result; ++ } ++ ++ /* ++ * Return the offset at which the last comment in line starts. If there is no ++ * comment in the whole line, -1 is returned. ++ * ++ * When "flags" is not null, it is set to point to the flags describing the ++ * recognized comment leader. ++ */ ++ int ++ get_last_leader_offset(line, flags) ++ char_u *line; ++ char_u **flags; ++ { ++ int result = -1; ++ int i, j; ++ int lower_check_bound = 0; ++ char_u *string; ++ char_u *com_leader; ++ char_u *com_flags; ++ char_u *list; ++ int found_one; ++ char_u part_buf[COM_MAX_LEN]; /* buffer for one option part */ ++ ++ /* ++ * Repeat to match several nested comment strings. ++ */ ++ i = (int)STRLEN(line); ++ while (--i >= lower_check_bound) ++ { ++ /* ++ * scan through the 'comments' option for a match ++ */ ++ found_one = FALSE; ++ for (list = curbuf->b_p_com; *list; ) ++ { ++ char_u *flags_save = list; ++ ++ /* ++ * Get one option part into part_buf[]. Advance list to next one. ++ * put string at start of string. ++ */ ++ (void)copy_option_part(&list, part_buf, COM_MAX_LEN, ","); ++ string = vim_strchr(part_buf, ':'); ++ if (string == NULL) /* If everything is fine, this cannot actually ++ * happen. */ ++ { ++ continue; ++ } ++ *string++ = NUL; /* Isolate flags from string. */ ++ com_leader = string; ++ ++ /* ++ * Line contents and string must match. ++ * When string starts with white space, must have some white space ++ * (but the amount does not need to match, there might be a mix of ++ * TABs and spaces). ++ */ ++ if (vim_iswhite(string[0])) ++ { ++ if (i == 0 || !vim_iswhite(line[i - 1])) ++ continue; ++ while (vim_iswhite(string[0])) ++ ++string; ++ } ++ for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j) ++ /* do nothing */; ++ if (string[j] != NUL) ++ continue; ++ ++ /* ++ * When 'b' flag used, there must be white space or an ++ * end-of-line after the string in the line. ++ */ ++ if (vim_strchr(part_buf, COM_BLANK) != NULL ++ && !vim_iswhite(line[i + j]) && line[i + j] != NUL) ++ { ++ continue; ++ } ++ ++ /* ++ * We have found a match, stop searching. ++ */ ++ found_one = TRUE; ++ ++ if (flags) ++ *flags = flags_save; ++ com_flags = flags_save; ++ ++ break; ++ } + +! if (found_one) +! { +! char_u part_buf2[COM_MAX_LEN]; /* buffer for one option part */ +! int len1, len2, off; +! +! result = i; +! /* +! * If this comment nests, continue searching. +! */ +! if (vim_strchr(part_buf, COM_NEST) != NULL) +! continue; +! +! lower_check_bound = i; +! +! /* Let's verify whether the comment leader found is a substring +! * of other comment leaders. If it is, let's adjust the +! * lower_check_bound so that we make sure that we have determined +! * the comment leader correctly. +! */ +! +! while (vim_iswhite(*com_leader)) +! ++com_leader; +! len1 = (int)STRLEN(com_leader); +! +! for (list = curbuf->b_p_com; *list; ) +! { +! char_u *flags_save = list; +! +! (void)copy_option_part(&list, part_buf2, COM_MAX_LEN, ","); +! if (flags_save == com_flags) +! continue; +! string = vim_strchr(part_buf2, ':'); +! ++string; +! while (vim_iswhite(*string)) +! ++string; +! len2 = (int)STRLEN(string); +! if (len2 == 0) +! continue; +! +! /* Now we have to verify whether string ends with a substring +! * beginning the com_leader. */ +! for (off = (len2 > i ? i : len2); off > 0 && off + len1 > len2;) +! { +! --off; +! if (!STRNCMP(string + off, com_leader, len2 - off)) +! { +! if (i - off < lower_check_bound) +! lower_check_bound = i - off; +! } +! } +! } +! } +! } +! return result; + } + #endif + +*** ../vim-7.3.540/src/normal.c 2012-05-25 13:12:33.000000000 +0200 +--- src/normal.c 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 1968,1974 **** + beep_flush(); + else + { +! (void)do_join(oap->line_count, oap->op_type == OP_JOIN, TRUE); + auto_format(FALSE, TRUE); + } + break; +--- 1968,1974 ---- + beep_flush(); + else + { +! (void)do_join(oap->line_count, oap->op_type == OP_JOIN, TRUE, TRUE); + auto_format(FALSE, TRUE); + } + break; +*************** +*** 4426,4432 **** + break; + } + #ifdef FEAT_COMMENTS +! if (get_leader_len(ml_get_curline(), NULL, FALSE) > 0) + { + /* Ignore this line, continue at start of next line. */ + ++curwin->w_cursor.lnum; +--- 4426,4432 ---- + break; + } + #ifdef FEAT_COMMENTS +! if (get_leader_len(ml_get_curline(), NULL, FALSE, TRUE) > 0) + { + /* Ignore this line, continue at start of next line. */ + ++curwin->w_cursor.lnum; +*************** +*** 9324,9330 **** + { + prep_redo(cap->oap->regname, cap->count0, + NUL, cap->cmdchar, NUL, NUL, cap->nchar); +! (void)do_join(cap->count0, cap->nchar == NUL, TRUE); + } + } + } +--- 9324,9330 ---- + { + prep_redo(cap->oap->regname, cap->count0, + NUL, cap->cmdchar, NUL, NUL, cap->nchar); +! (void)do_join(cap->count0, cap->nchar == NUL, TRUE, TRUE); + } + } + } +*** ../vim-7.3.540/src/ops.c 2012-05-18 12:49:33.000000000 +0200 +--- src/ops.c 2012-06-06 15:43:31.000000000 +0200 +*************** +*** 112,117 **** +--- 112,120 ---- + # endif + #endif + static void dis_msg __ARGS((char_u *p, int skip_esc)); ++ #if defined(FEAT_COMMENTS) || defined(PROTO) ++ static char_u *skip_comment __ARGS((char_u *line, int process, int include_space, int *is_comment)); ++ #endif + #ifdef FEAT_VISUAL + static void block_prep __ARGS((oparg_T *oap, struct block_def *, linenr_T, int)); + #endif +*************** +*** 1987,1993 **** + curwin->w_cursor = curpos; /* restore curwin->w_cursor */ + } + if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! (void)do_join(2, FALSE, FALSE); + } + } + +--- 1990,1996 ---- + curwin->w_cursor = curpos; /* restore curwin->w_cursor */ + } + if (curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! (void)do_join(2, FALSE, FALSE, FALSE); + } + } + +*************** +*** 4197,4213 **** + ui_breakcheck(); + } + + /* + * Join 'count' lines (minimal 2) at cursor position. + * When "save_undo" is TRUE save lines for undo first. + * + * return FAIL for failure, OK otherwise + */ + int +! do_join(count, insert_space, save_undo) + long count; + int insert_space; + int save_undo; + { + char_u *curr = NULL; + char_u *curr_start = NULL; +--- 4200,4297 ---- + ui_breakcheck(); + } + ++ #if defined(FEAT_COMMENTS) || defined(PROTO) ++ /* ++ * If "process" is TRUE and the line begins with a comment leader (possibly ++ * after some white space), return a pointer to the text after it. Put a boolean ++ * value indicating whether the line ends with an unclosed comment in ++ * "is_comment". ++ * line - line to be processed, ++ * process - if FALSE, will only check whether the line ends with an unclosed ++ * comment, ++ * include_space - whether to also skip space following the comment leader, ++ * is_comment - will indicate whether the current line ends with an unclosed ++ * comment. ++ */ ++ static char_u * ++ skip_comment(line, process, include_space, is_comment) ++ char_u *line; ++ int process; ++ int include_space; ++ int *is_comment; ++ { ++ char_u *comment_flags = NULL; ++ int lead_len; ++ int leader_offset = get_last_leader_offset(line, &comment_flags); ++ ++ *is_comment = FALSE; ++ if (leader_offset != -1) ++ { ++ /* Let's check whether the line ends with an unclosed comment. ++ * If the last comment leader has COM_END in flags, there's no comment. ++ */ ++ while (*comment_flags) ++ { ++ if (*comment_flags == COM_END ++ || *comment_flags == ':') ++ break; ++ ++comment_flags; ++ } ++ if (*comment_flags != COM_END) ++ *is_comment = TRUE; ++ } ++ ++ if (process == FALSE) ++ return line; ++ ++ lead_len = get_leader_len(line, &comment_flags, FALSE, include_space); ++ ++ if (lead_len == 0) ++ return line; ++ ++ /* Find: ++ * - COM_START, ++ * - COM_END, ++ * - colon, ++ * whichever comes first. ++ */ ++ while (*comment_flags) ++ { ++ if (*comment_flags == COM_START ++ || *comment_flags == COM_END ++ || *comment_flags == ':') ++ { ++ break; ++ } ++ ++comment_flags; ++ } ++ ++ /* If we found a colon, it means that we are not processing a line ++ * starting with an opening or a closing part of a three-part ++ * comment. That's good, because we don't want to remove those as ++ * this would be annoying. ++ */ ++ if (*comment_flags == ':' || *comment_flags == NUL) ++ line += lead_len; ++ ++ return line; ++ } ++ #endif ++ + /* + * Join 'count' lines (minimal 2) at cursor position. + * When "save_undo" is TRUE save lines for undo first. ++ * Set "use_formatoptions" to FALSE when e.g. processing ++ * backspace and comment leaders should not be removed. + * + * return FAIL for failure, OK otherwise + */ + int +! do_join(count, insert_space, save_undo, use_formatoptions) + long count; + int insert_space; + int save_undo; ++ int use_formatoptions UNUSED; + { + char_u *curr = NULL; + char_u *curr_start = NULL; +*************** +*** 4221,4226 **** +--- 4305,4317 ---- + linenr_T t; + colnr_T col = 0; + int ret = OK; ++ #if defined(FEAT_COMMENTS) || defined(PROTO) ++ int *comments; ++ int remove_comments = (use_formatoptions == TRUE) ++ && has_format_option(FO_REMOVE_COMS); ++ int prev_was_comment; ++ #endif ++ + + if (save_undo && u_save((linenr_T)(curwin->w_cursor.lnum - 1), + (linenr_T)(curwin->w_cursor.lnum + count)) == FAIL) +*************** +*** 4232,4237 **** +--- 4323,4339 ---- + spaces = lalloc_clear((long_u)count, TRUE); + if (spaces == NULL) + return FAIL; ++ #if defined(FEAT_COMMENTS) || defined(PROTO) ++ if (remove_comments) ++ { ++ comments = (int *)lalloc_clear((long_u)count * sizeof(int), TRUE); ++ if (comments == NULL) ++ { ++ vim_free(spaces); ++ return FAIL; ++ } ++ } ++ #endif + + /* + * Don't move anything, just compute the final line length +*************** +*** 4240,4245 **** +--- 4342,4366 ---- + for (t = 0; t < count; ++t) + { + curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t)); ++ #if defined(FEAT_COMMENTS) || defined(PROTO) ++ if (remove_comments) ++ { ++ /* We don't want to remove the comment leader if the ++ * previous line is not a comment. */ ++ if (t > 0 && prev_was_comment) ++ { ++ ++ char_u *new_curr = skip_comment(curr, TRUE, insert_space, ++ &prev_was_comment); ++ comments[t] = new_curr - curr; ++ curr = new_curr; ++ } ++ else ++ curr = skip_comment(curr, FALSE, insert_space, ++ &prev_was_comment); ++ } ++ #endif ++ + if (insert_space && t > 0) + { + curr = skipwhite(curr); +*************** +*** 4327,4332 **** +--- 4448,4457 ---- + if (t == 0) + break; + curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1)); ++ #if defined(FEAT_COMMENTS) || defined(PROTO) ++ if (remove_comments) ++ curr += comments[t - 1]; ++ #endif + if (insert_space && t > 1) + curr = skipwhite(curr); + currsize = (int)STRLEN(curr); +*************** +*** 4364,4369 **** +--- 4489,4498 ---- + + theend: + vim_free(spaces); ++ #if defined(FEAT_COMMENTS) || defined(PROTO) ++ if (remove_comments) ++ vim_free(comments); ++ #endif + return ret; + } + +*************** +*** 4788,4794 **** + (long)-next_leader_len); + #endif + curwin->w_cursor.lnum--; +! if (do_join(2, TRUE, FALSE) == FAIL) + { + beep_flush(); + break; +--- 4917,4923 ---- + (long)-next_leader_len); + #endif + curwin->w_cursor.lnum--; +! if (do_join(2, TRUE, FALSE, FALSE) == FAIL) + { + beep_flush(); + break; +*************** +*** 4844,4850 **** + + ptr = ml_get(lnum); + if (do_comments) +! *leader_len = get_leader_len(ptr, leader_flags, FALSE); + else + *leader_len = 0; + +--- 4973,4979 ---- + + ptr = ml_get(lnum); + if (do_comments) +! *leader_len = get_leader_len(ptr, leader_flags, FALSE, TRUE); + else + *leader_len = 0; + +*** ../vim-7.3.540/src/option.h 2012-02-20 22:18:22.000000000 +0100 +--- src/option.h 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 104,113 **** + #define FO_ONE_LETTER '1' + #define FO_WHITE_PAR 'w' /* trailing white space continues paragr. */ + #define FO_AUTO 'a' /* automatic formatting */ + + #define DFLT_FO_VI "vt" + #define DFLT_FO_VIM "tcq" +! #define FO_ALL "tcroq2vlb1mMBn,aw" /* for do_set() */ + + /* characters for the p_cpo option: */ + #define CPO_ALTREAD 'a' /* ":read" sets alternate file name */ +--- 104,114 ---- + #define FO_ONE_LETTER '1' + #define FO_WHITE_PAR 'w' /* trailing white space continues paragr. */ + #define FO_AUTO 'a' /* automatic formatting */ ++ #define FO_REMOVE_COMS 'j' /* remove comment leaders when joining lines */ + + #define DFLT_FO_VI "vt" + #define DFLT_FO_VIM "tcq" +! #define FO_ALL "tcroq2vlb1mMBn,awj" /* for do_set() */ + + /* characters for the p_cpo option: */ + #define CPO_ALTREAD 'a' /* ":read" sets alternate file name */ +*** ../vim-7.3.540/src/proto/misc1.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/misc1.pro 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 6,12 **** + int set_indent __ARGS((int size, int flags)); + int get_number_indent __ARGS((linenr_T lnum)); + int open_line __ARGS((int dir, int flags, int old_indent)); +! int get_leader_len __ARGS((char_u *line, char_u **flags, int backward)); + int plines __ARGS((linenr_T lnum)); + int plines_win __ARGS((win_T *wp, linenr_T lnum, int winheight)); + int plines_nofill __ARGS((linenr_T lnum)); +--- 6,13 ---- + int set_indent __ARGS((int size, int flags)); + int get_number_indent __ARGS((linenr_T lnum)); + int open_line __ARGS((int dir, int flags, int old_indent)); +! int get_leader_len __ARGS((char_u *line, char_u **flags, int backward, int do_skip_space)); +! int get_last_leader_offset __ARGS((char_u *line, char_u **flags)); + int plines __ARGS((linenr_T lnum)); + int plines_win __ARGS((win_T *wp, linenr_T lnum, int winheight)); + int plines_nofill __ARGS((linenr_T lnum)); +*** ../vim-7.3.540/src/proto/ops.pro 2010-08-15 21:57:28.000000000 +0200 +--- src/proto/ops.pro 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 36,42 **** + int preprocs_left __ARGS((void)); + int get_register_name __ARGS((int num)); + void ex_display __ARGS((exarg_T *eap)); +! int do_join __ARGS((long count, int insert_space, int save_undo)); + void op_format __ARGS((oparg_T *oap, int keep_cursor)); + void op_formatexpr __ARGS((oparg_T *oap)); + int fex_format __ARGS((linenr_T lnum, long count, int c)); +--- 36,42 ---- + int preprocs_left __ARGS((void)); + int get_register_name __ARGS((int num)); + void ex_display __ARGS((exarg_T *eap)); +! int do_join __ARGS((long count, int insert_space, int save_undo, int use_formatoptions)); + void op_format __ARGS((oparg_T *oap, int keep_cursor)); + void op_formatexpr __ARGS((oparg_T *oap)); + int fex_format __ARGS((linenr_T lnum, long count, int c)); +*** ../vim-7.3.540/src/search.c 2012-02-04 23:34:57.000000000 +0100 +--- src/search.c 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 1548,1554 **** + int len; + int stop = TRUE; + #ifdef FEAT_MBYTE +! static char_u bytes[MB_MAXBYTES]; + static int bytelen = 1; /* >1 for multi-byte char */ + #endif + +--- 1548,1554 ---- + int len; + int stop = TRUE; + #ifdef FEAT_MBYTE +! static char_u bytes[MB_MAXBYTES + 1]; + static int bytelen = 1; /* >1 for multi-byte char */ + #endif + +*************** +*** 4901,4907 **** + #ifdef FEAT_COMMENTS + if ((*line != '#' || + STRNCMP(skipwhite(line + 1), "define", 6) != 0) +! && get_leader_len(line, NULL, FALSE)) + matched = FALSE; + + /* +--- 4901,4907 ---- + #ifdef FEAT_COMMENTS + if ((*line != '#' || + STRNCMP(skipwhite(line + 1), "define", 6) != 0) +! && get_leader_len(line, NULL, FALSE, TRUE)) + matched = FALSE; + + /* +*** ../vim-7.3.540/src/testdir/test29.in 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test29.in 2012-06-06 15:44:38.000000000 +0200 +*************** +*** 4,19 **** + and with 'cpoptions' flag 'j' set or not + + STARTTEST + :set nocompatible viminfo+=nviminfo + :set nojoinspaces + :set cpoptions-=j + /firstline/ +! j"tdGpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j + j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j joinspaces + j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j + j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j nojoinspaces compatible +! j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj4Jy3l$pjdG:?firstline?+1,$w! test.out +! :qa! + ENDTEST + + firstline +--- 4,20 ---- + and with 'cpoptions' flag 'j' set or not + + STARTTEST ++ :so small.vim + :set nocompatible viminfo+=nviminfo + :set nojoinspaces + :set cpoptions-=j + /firstline/ +! j"td/^STARTTEST/-1 +! PJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j + j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j joinspaces + j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j + j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j nojoinspaces compatible +! j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj4Jy3l$pjd/STARTTEST/-2 + ENDTEST + + firstline +*************** +*** 54,56 **** +--- 55,181 ---- + hjkl iop! + ert + ++ STARTTEST ++ /^{/+1 ++ :set comments=s1:/*,mb:*,ex:*/,:// ++ :set nojoinspaces fo=j ++ :set backspace=eol,start ++ :.,+3join ++ j4J ++ :.,+2join ++ j3J ++ :.,+2join ++ j3J ++ :.,+2join ++ jj3J ++ ENDTEST ++ ++ { ++ ++ /* ++ * Make sure the previous comment leader is not removed. ++ */ ++ ++ /* ++ * Make sure the previous comment leader is not removed. ++ */ ++ ++ // Should the next comment leader be left alone? ++ // Yes. ++ ++ // Should the next comment leader be left alone? ++ // Yes. ++ ++ /* Here the comment leader should be left intact. */ ++ // And so should this one. ++ ++ /* Here the comment leader should be left intact. */ ++ // And so should this one. ++ ++ if (condition) // Remove the next comment leader! ++ // OK, I will. ++ action(); ++ ++ if (condition) // Remove the next comment leader! ++ // OK, I will. ++ action(); ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set comments=s1:/*,mb:*,ex:*/,:// ++ :set comments+=s1:>#,mb:#,ex:#<,:< ++ :set cpoptions-=j joinspaces fo=j ++ :set backspace=eol,start ++ :.,+3join ++ j4J ++ :.,+2join ++ j3J ++ :.,+2join ++ j3J ++ :.,+2join ++ jj3J ++ j:.,+2join ++ jj3J ++ j:.,+5join ++ j6J ++ oSome code! // Make sure backspacing does not remove this comment leader.0i ++ ENDTEST ++ ++ { ++ ++ /* ++ * Make sure the previous comment leader is not removed. ++ */ ++ ++ /* ++ * Make sure the previous comment leader is not removed. ++ */ ++ ++ // Should the next comment leader be left alone? ++ // Yes. ++ ++ // Should the next comment leader be left alone? ++ // Yes. ++ ++ /* Here the comment leader should be left intact. */ ++ // And so should this one. ++ ++ /* Here the comment leader should be left intact. */ ++ // And so should this one. ++ ++ if (condition) // Remove the next comment leader! ++ // OK, I will. ++ action(); ++ ++ if (condition) // Remove the next comment leader! ++ // OK, I will. ++ action(); ++ ++ int i = 7 /* foo *// 3 ++ // comment ++ ; ++ ++ int i = 7 /* foo *// 3 ++ // comment ++ ; ++ ++ ># Note that the last character of the ending comment leader (left angle ++ # bracket) is a comment leader itself. Make sure that this comment leader is ++ # not removed from the next line #< ++ < On this line a new comment is opened which spans 2 lines. This comment should ++ < retain its comment leader. ++ ++ ># Note that the last character of the ending comment leader (left angle ++ # bracket) is a comment leader itself. Make sure that this comment leader is ++ # not removed from the next line #< ++ < On this line a new comment is opened which spans 2 lines. This comment should ++ < retain its comment leader. ++ ++ } ++ ++ STARTTEST ++ :g/^STARTTEST/.,/^ENDTEST/d ++ :?firstline?+1,$w! test.out ++ :qa! ++ ENDTEST +*** ../vim-7.3.540/src/testdir/test29.ok 2010-08-15 21:57:29.000000000 +0200 +--- src/testdir/test29.ok 2012-06-06 13:00:29.000000000 +0200 +*************** +*** 47,49 **** +--- 47,86 ---- + asdfasdf asdf + asdfasdf asdf + zx cvn. as dfg? hjkl iop! ert a ++ ++ ++ { ++ /* Make sure the previous comment leader is not removed. */ ++ /* Make sure the previous comment leader is not removed. */ ++ // Should the next comment leader be left alone? Yes. ++ // Should the next comment leader be left alone? Yes. ++ /* Here the comment leader should be left intact. */ // And so should this one. ++ /* Here the comment leader should be left intact. */ // And so should this one. ++ if (condition) // Remove the next comment leader! OK, I will. ++ action(); ++ if (condition) // Remove the next comment leader! OK, I will. ++ action(); ++ } ++ ++ ++ { ++ /* Make sure the previous comment leader is not removed. */ ++ /* Make sure the previous comment leader is not removed. */ ++ // Should the next comment leader be left alone? Yes. ++ // Should the next comment leader be left alone? Yes. ++ /* Here the comment leader should be left intact. */ // And so should this one. ++ /* Here the comment leader should be left intact. */ // And so should this one. ++ if (condition) // Remove the next comment leader! OK, I will. ++ action(); ++ if (condition) // Remove the next comment leader! OK, I will. ++ action(); ++ int i = 7 /* foo *// 3 // comment ++ ; ++ int i = 7 /* foo *// 3 // comment ++ ; ++ ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader. ++ ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment is opened which spans 2 lines. This comment should retain its comment leader. ++ ++ Some code!// Make sure backspacing does not remove this comment leader. ++ } ++ +*** ../vim-7.3.540/src/version.c 2012-06-06 12:06:10.000000000 +0200 +--- src/version.c 2012-06-06 16:10:03.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 541, + /**/ + +-- +I have a drinking problem -- I don't have a drink! + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.542 b/7.3.542 new file mode 100644 index 0000000..8108612 --- /dev/null +++ b/7.3.542 @@ -0,0 +1,73 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.542 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.542 (after 7.3.506) +Problem: Function is sometimes unused. +Solution: Add #ifdef. +Files: src/gui_gtk.c + + +*** ../vim-7.3.541/src/gui_gtk.c 2012-04-25 17:10:12.000000000 +0200 +--- src/gui_gtk.c 2012-06-06 15:25:12.000000000 +0200 +*************** +*** 90,100 **** +--- 90,102 ---- + static void entry_activate_cb(GtkWidget *widget, gpointer data); + static void entry_changed_cb(GtkWidget *entry, GtkWidget *dialog); + static void find_replace_cb(GtkWidget *widget, gpointer data); ++ #if defined(FEAT_BROWSE) || defined(PROTO) + static void recent_func_log_func( + const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); ++ #endif + + #if defined(FEAT_TOOLBAR) + /* +*************** +*** 1896,1901 **** +--- 1898,1904 ---- + do_cmdline_cmd((char_u *)"emenu ToolBar.FindHelp"); + } + ++ #if defined(FEAT_BROWSE) || defined(PROTO) + static void + recent_func_log_func(const gchar *log_domain UNUSED, + GLogLevelFlags log_level UNUSED, +*************** +*** 1905,1908 **** + /* We just want to suppress the warnings. */ + /* http://bugzilla.gnome.org/show_bug.cgi?id=664587 */ + } +! +--- 1908,1911 ---- + /* We just want to suppress the warnings. */ + /* http://bugzilla.gnome.org/show_bug.cgi?id=664587 */ + } +! #endif +*** ../vim-7.3.541/src/version.c 2012-06-06 16:12:54.000000000 +0200 +--- src/version.c 2012-06-06 16:14:17.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 542, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +1. At lunch time, sit in your parked car with sunglasses on and point + a hair dryer at passing cars. See if they slow down. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.543 b/7.3.543 new file mode 100644 index 0000000..3fa569c --- /dev/null +++ b/7.3.543 @@ -0,0 +1,55 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.543 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.543 +Problem: The cursor is in the wrong line after using ":copen". (John + Beckett) +Solution: Invoke more drastic redraw method. +Files: src/eval.c + + +*** ../vim-7.3.542/src/eval.c 2012-06-01 15:20:49.000000000 +0200 +--- src/eval.c 2012-06-06 16:28:11.000000000 +0200 +*************** +*** 18507,18515 **** + curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol"); + + check_cursor(); +! changed_cline_bef_curs(); +! invalidate_botline(); +! redraw_later(VALID); + + if (curwin->w_topline == 0) + curwin->w_topline = 1; +--- 18507,18513 ---- + curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol"); + + check_cursor(); +! changed_window_setting(); + + if (curwin->w_topline == 0) + curwin->w_topline = 1; +*** ../vim-7.3.542/src/version.c 2012-06-06 16:14:36.000000000 +0200 +--- src/version.c 2012-06-06 16:28:16.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 543, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +2. Page yourself over the intercom. Don't disguise your voice. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.544 b/7.3.544 new file mode 100644 index 0000000..198a6cb --- /dev/null +++ b/7.3.544 @@ -0,0 +1,81 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.544 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.544 +Problem: There is no good way to close a quickfix window when closing the + last ordinary window. +Solution: Add the QuitPre autocommand. +Files: src/ex_docmd.c, src/fileio.c, src/vim.h + + +*** ../vim-7.3.543/src/ex_docmd.c 2012-06-06 16:12:54.000000000 +0200 +--- src/ex_docmd.c 2012-06-06 17:58:41.000000000 +0200 +*************** +*** 6458,6463 **** +--- 6458,6464 ---- + return; + } + #ifdef FEAT_AUTOCMD ++ apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf); + if (curbuf_locked()) + return; + #endif +*** ../vim-7.3.543/src/fileio.c 2012-04-30 17:04:47.000000000 +0200 +--- src/fileio.c 2012-06-06 17:32:12.000000000 +0200 +*************** +*** 7678,7683 **** +--- 7678,7684 ---- + {"MenuPopup", EVENT_MENUPOPUP}, + {"QuickFixCmdPost", EVENT_QUICKFIXCMDPOST}, + {"QuickFixCmdPre", EVENT_QUICKFIXCMDPRE}, ++ {"QuitPre", EVENT_QUITPRE}, + {"RemoteReply", EVENT_REMOTEREPLY}, + {"SessionLoadPost", EVENT_SESSIONLOADPOST}, + {"ShellCmdPost", EVENT_SHELLCMDPOST}, +*** ../vim-7.3.543/src/vim.h 2012-06-01 15:20:49.000000000 +0200 +--- src/vim.h 2012-06-06 17:30:01.000000000 +0200 +*************** +*** 1264,1271 **** + EVENT_INSERTENTER, /* when entering Insert mode */ + EVENT_INSERTLEAVE, /* when leaving Insert mode */ + EVENT_MENUPOPUP, /* just before popup menu is displayed */ +! EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc */ +! EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc */ + EVENT_SESSIONLOADPOST, /* after loading a session file */ + EVENT_STDINREADPOST, /* after reading from stdin */ + EVENT_STDINREADPRE, /* before reading from stdin */ +--- 1264,1272 ---- + EVENT_INSERTENTER, /* when entering Insert mode */ + EVENT_INSERTLEAVE, /* when leaving Insert mode */ + EVENT_MENUPOPUP, /* just before popup menu is displayed */ +! EVENT_QUICKFIXCMDPOST, /* after :make, :grep etc. */ +! EVENT_QUICKFIXCMDPRE, /* before :make, :grep etc. */ +! EVENT_QUITPRE, /* before :quit */ + EVENT_SESSIONLOADPOST, /* after loading a session file */ + EVENT_STDINREADPOST, /* after reading from stdin */ + EVENT_STDINREADPRE, /* before reading from stdin */ +*** ../vim-7.3.543/src/version.c 2012-06-06 16:29:06.000000000 +0200 +--- src/version.c 2012-06-06 18:02:09.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 544, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +3. Every time someone asks you to do something, ask if they want fries + with that. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.545 b/7.3.545 new file mode 100644 index 0000000..1bd76eb --- /dev/null +++ b/7.3.545 @@ -0,0 +1,359 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.545 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.545 +Problem: When closing a window or buffer autocommands may close it too, + causing problems for where the autocommand was invoked from. +Solution: Add the w_closing and b_closing flags. When set disallow ":q" and + ":close" to prevent recursive closing. +Files: src/structs.h, src/buffer.c, src/ex_docmd.c, src/window.c + + +*** ../vim-7.3.544/src/structs.h 2012-02-04 21:57:44.000000000 +0100 +--- src/structs.h 2012-06-06 16:43:34.000000000 +0200 +*************** +*** 1201,1206 **** +--- 1201,1210 ---- + typedef struct qf_info_S qf_info_T; + #endif + ++ /* ++ * These are items normally related to a buffer. But when using ":ownsyntax" ++ * a window may have its own instance. ++ */ + typedef struct { + #ifdef FEAT_SYN_HL + hashtab_T b_keywtab; /* syntax keywords hash table */ +*************** +*** 1290,1295 **** +--- 1294,1303 ---- + int b_nwindows; /* nr of windows open on this buffer */ + + int b_flags; /* various BF_ flags */ ++ #ifdef FEAT_AUTOCMD ++ int b_closing; /* buffer is being closed, don't let ++ autocommands close it too. */ ++ #endif + + /* + * b_ffname has the full path of the file (NULL for no name). +*************** +*** 1853,1858 **** +--- 1861,1870 ---- + win_T *w_prev; /* link to previous window */ + win_T *w_next; /* link to next window */ + #endif ++ #ifdef FEAT_AUTOCMD ++ int w_closing; /* window is being closed, don't let ++ autocommands close it too. */ ++ #endif + + frame_T *w_frame; /* frame containing this window */ + +*** ../vim-7.3.544/src/buffer.c 2012-03-16 14:32:10.000000000 +0100 +--- src/buffer.c 2012-06-06 18:57:27.000000000 +0200 +*************** +*** 377,404 **** + /* When the buffer is no longer in a window, trigger BufWinLeave */ + if (buf->b_nwindows == 1) + { + apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname, + FALSE, buf); +! /* Return if autocommands deleted the buffer or made it the only one. */ +! if (!buf_valid(buf) || (abort_if_last && one_window())) + { + EMSG(_(e_auabort)); + return; + } + + /* When the buffer becomes hidden, but is not unloaded, trigger + * BufHidden */ + if (!unload_buf) + { + apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname, + FALSE, buf); +! /* Return if autocommands deleted the buffer or made it the only +! * one. */ +! if (!buf_valid(buf) || (abort_if_last && one_window())) +! { +! EMSG(_(e_auabort)); +! return; +! } + } + # ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ +--- 377,411 ---- + /* When the buffer is no longer in a window, trigger BufWinLeave */ + if (buf->b_nwindows == 1) + { ++ buf->b_closing = TRUE; + apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname, + FALSE, buf); +! if (!buf_valid(buf)) + { ++ /* Autocommands deleted the buffer. */ ++ aucmd_abort: + EMSG(_(e_auabort)); + return; + } ++ buf->b_closing = FALSE; ++ if (abort_if_last && one_window()) ++ /* Autocommands made this the only window. */ ++ goto aucmd_abort; + + /* When the buffer becomes hidden, but is not unloaded, trigger + * BufHidden */ + if (!unload_buf) + { ++ buf->b_closing = TRUE; + apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname, + FALSE, buf); +! if (!buf_valid(buf)) +! /* Autocommands deleted the buffer. */ +! goto aucmd_abort; +! buf->b_closing = FALSE; +! if (abort_if_last && one_window()) +! /* Autocommands made this the only window. */ +! goto aucmd_abort; + } + # ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ +*************** +*** 552,557 **** +--- 559,565 ---- + #ifdef FEAT_AUTOCMD + int is_curbuf = (buf == curbuf); + ++ buf->b_closing = TRUE; + apply_autocmds(EVENT_BUFUNLOAD, buf->b_fname, buf->b_fname, FALSE, buf); + if (!buf_valid(buf)) /* autocommands may delete the buffer */ + return; +*************** +*** 568,573 **** +--- 576,582 ---- + if (!buf_valid(buf)) /* autocommands may delete the buffer */ + return; + } ++ buf->b_closing = FALSE; + # ifdef FEAT_EVAL + if (aborting()) /* autocmds may abort script processing */ + return; +*************** +*** 1150,1155 **** +--- 1159,1167 ---- + * a window with this buffer. + */ + while (buf == curbuf ++ # ifdef FEAT_AUTOCMD ++ && !(curwin->w_closing || curwin->w_buffer->b_closing) ++ # endif + && (firstwin != lastwin || first_tabpage->tp_next != NULL)) + win_close(curwin, FALSE); + #endif +*************** +*** 4750,4756 **** + #ifdef FEAT_WINDOWS + || (had_tab > 0 && wp != firstwin) + #endif +! ) && firstwin != lastwin) + { + win_close(wp, FALSE); + #ifdef FEAT_AUTOCMD +--- 4762,4772 ---- + #ifdef FEAT_WINDOWS + || (had_tab > 0 && wp != firstwin) + #endif +! ) && firstwin != lastwin +! #ifdef FEAT_AUTOCMD +! && !(wp->w_closing || wp->w_buffer->b_closing) +! #endif +! ) + { + win_close(wp, FALSE); + #ifdef FEAT_AUTOCMD +*** ../vim-7.3.544/src/ex_docmd.c 2012-06-06 18:03:01.000000000 +0200 +--- src/ex_docmd.c 2012-06-06 18:06:46.000000000 +0200 +*************** +*** 6459,6465 **** + } + #ifdef FEAT_AUTOCMD + apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf); +! if (curbuf_locked()) + return; + #endif + +--- 6459,6467 ---- + } + #ifdef FEAT_AUTOCMD + apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf); +! /* Refuse to quick when locked or when the buffer in the last window is +! * being closed (can only happen in autocommands). */ +! if (curbuf_locked() || (curbuf->b_nwindows == 1 && curbuf->b_closing)) + return; + #endif + +*** ../vim-7.3.544/src/window.c 2012-05-25 12:38:57.000000000 +0200 +--- src/window.c 2012-06-06 18:47:19.000000000 +0200 +*************** +*** 2034,2040 **** + + for (wp = firstwin; wp != NULL && lastwin != firstwin; ) + { +! if (wp->w_buffer == buf && (!keep_curwin || wp != curwin)) + { + win_close(wp, FALSE); + +--- 2034,2044 ---- + + for (wp = firstwin; wp != NULL && lastwin != firstwin; ) + { +! if (wp->w_buffer == buf && (!keep_curwin || wp != curwin) +! #ifdef FEAT_AUTOCMD +! && !(wp->w_closing || wp->w_buffer->b_closing) +! #endif +! ) + { + win_close(wp, FALSE); + +*************** +*** 2051,2057 **** + nexttp = tp->tp_next; + if (tp != curtab) + for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next) +! if (wp->w_buffer == buf) + { + win_close_othertab(wp, FALSE, tp); + +--- 2055,2065 ---- + nexttp = tp->tp_next; + if (tp != curtab) + for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next) +! if (wp->w_buffer == buf +! #ifdef FEAT_AUTOCMD +! && !(wp->w_closing || wp->w_buffer->b_closing) +! #endif +! ) + { + win_close_othertab(wp, FALSE, tp); + +*************** +*** 2168,2173 **** +--- 2176,2183 ---- + } + + #ifdef FEAT_AUTOCMD ++ if (win->w_closing || win->w_buffer->b_closing) ++ return; /* window is already being closed */ + if (win == aucmd_win) + { + EMSG(_("E813: Cannot close autocmd window")); +*************** +*** 2203,2219 **** + wp = frame2win(win_altframe(win, NULL)); + + /* +! * Be careful: If autocommands delete the window, return now. + */ + if (wp->w_buffer != curbuf) + { + other_buffer = TRUE; + apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf); +! if (!win_valid(win) || last_window()) + return; + } + apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf); +! if (!win_valid(win) || last_window()) + return; + # ifdef FEAT_EVAL + /* autocmds may abort script processing */ +--- 2213,2238 ---- + wp = frame2win(win_altframe(win, NULL)); + + /* +! * Be careful: If autocommands delete the window or cause this window +! * to be the last one left, return now. + */ + if (wp->w_buffer != curbuf) + { + other_buffer = TRUE; ++ win->w_closing = TRUE; + apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf); +! if (!win_valid(win)) +! return; +! win->w_closing = FALSE; +! if (last_window()) + return; + } ++ win->w_closing = TRUE; + apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf); +! if (!win_valid(win)) +! return; +! win->w_closing = FALSE; +! if (last_window()) + return; + # ifdef FEAT_EVAL + /* autocmds may abort script processing */ +*************** +*** 2240,2246 **** + * Close the link to the buffer. + */ + if (win->w_buffer != NULL) +! close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, TRUE); + + /* Autocommands may have closed the window already, or closed the only + * other window or moved to another tab page. */ +--- 2259,2274 ---- + * Close the link to the buffer. + */ + if (win->w_buffer != NULL) +! { +! #ifdef FEAT_AUTOCMD +! win->w_closing = TRUE; +! #endif +! close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, FALSE); +! #ifdef FEAT_AUTOCMD +! if (win_valid(win)) +! win->w_closing = FALSE; +! #endif +! } + + /* Autocommands may have closed the window already, or closed the only + * other window or moved to another tab page. */ +*************** +*** 2346,2351 **** +--- 2374,2384 ---- + tabpage_T *ptp = NULL; + int free_tp = FALSE; + ++ #ifdef FEAT_AUTOCMD ++ if (win->w_closing || win->w_buffer->b_closing) ++ return; /* window is already being closed */ ++ #endif ++ + /* Close the link to the buffer. */ + close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0, FALSE); + +*** ../vim-7.3.544/src/version.c 2012-06-06 18:03:01.000000000 +0200 +--- src/version.c 2012-06-06 18:53:06.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 545, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +4. Put your garbage can on your desk and label it "in". + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.546 b/7.3.546 new file mode 100644 index 0000000..c883d2d --- /dev/null +++ b/7.3.546 @@ -0,0 +1,54 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.546 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.546 +Problem: Bogus line break. +Solution: Remove the line break. +Files: src/screen.c + + +*** ../vim-7.3.545/src/screen.c 2012-06-01 15:20:49.000000000 +0200 +--- src/screen.c 2012-06-01 16:31:30.000000000 +0200 +*************** +*** 3228,3235 **** + /* no bad word found at line start, don't check until end of a + * word */ + spell_hlf = HLF_COUNT; +! word_end = (int)(spell_to_word_end(ptr, wp) +! - line + 1); + } + else + { +--- 3228,3234 ---- + /* no bad word found at line start, don't check until end of a + * word */ + spell_hlf = HLF_COUNT; +! word_end = (int)(spell_to_word_end(ptr, wp) - line + 1); + } + else + { +*** ../vim-7.3.545/src/version.c 2012-06-06 19:02:40.000000000 +0200 +--- src/version.c 2012-06-06 19:05:11.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 546, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +5. Put decaf in the coffee maker for 3 weeks. Once everyone has gotten + over their caffeine addictions, switch to espresso. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.547 b/7.3.547 new file mode 100644 index 0000000..5533144 --- /dev/null +++ b/7.3.547 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.547 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.547 (after 7.3.541) +Problem: Compiler warning for uninitialized variable. +Solution: Initialize it. +Files: src/ops.c + + +*** ../vim-7.3.546/src/ops.c 2012-06-06 16:12:54.000000000 +0200 +--- src/ops.c 2012-06-06 23:06:45.000000000 +0200 +*************** +*** 4306,4312 **** + colnr_T col = 0; + int ret = OK; + #if defined(FEAT_COMMENTS) || defined(PROTO) +! int *comments; + int remove_comments = (use_formatoptions == TRUE) + && has_format_option(FO_REMOVE_COMS); + int prev_was_comment; +--- 4306,4312 ---- + colnr_T col = 0; + int ret = OK; + #if defined(FEAT_COMMENTS) || defined(PROTO) +! int *comments = NULL; + int remove_comments = (use_formatoptions == TRUE) + && has_format_option(FO_REMOVE_COMS); + int prev_was_comment; +*** ../vim-7.3.546/src/version.c 2012-06-06 19:05:45.000000000 +0200 +--- src/version.c 2012-06-06 23:07:26.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 547, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +9. As often as possible, skip rather than walk. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.548 b/7.3.548 new file mode 100644 index 0000000..3692a9a --- /dev/null +++ b/7.3.548 @@ -0,0 +1,53 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.548 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.548 +Problem: Compiler warning on 64 bit Windows. +Solution: Add type cast. (Mike Williams) +Files: src/ops.c + + +*** ../vim-7.3.547/src/ops.c 2012-06-06 23:08:33.000000000 +0200 +--- src/ops.c 2012-06-07 21:07:57.000000000 +0200 +*************** +*** 4352,4358 **** + + char_u *new_curr = skip_comment(curr, TRUE, insert_space, + &prev_was_comment); +! comments[t] = new_curr - curr; + curr = new_curr; + } + else +--- 4352,4358 ---- + + char_u *new_curr = skip_comment(curr, TRUE, insert_space, + &prev_was_comment); +! comments[t] = (int)(new_curr - curr); + curr = new_curr; + } + else +*** ../vim-7.3.547/src/version.c 2012-06-06 23:08:33.000000000 +0200 +--- src/version.c 2012-06-07 21:08:35.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 548, + /**/ + +-- +How To Keep A Healthy Level Of Insanity: +17. When the money comes out the ATM, scream "I won!, I won! 3rd + time this week!!!!!" + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.549 b/7.3.549 new file mode 100644 index 0000000..6d27fc3 --- /dev/null +++ b/7.3.549 @@ -0,0 +1,125 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.549 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.549 +Problem: In 'cinoptions' "0s" is interpreted as one shiftwidth. (David + Pineau) +Solution: Use the zero as zero. (Lech Lorens) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + + +*** ../vim-7.3.548/src/misc1.c 2012-06-06 16:12:54.000000000 +0200 +--- src/misc1.c 2012-06-13 13:17:11.000000000 +0200 +*************** +*** 6635,6640 **** +--- 6635,6641 ---- + int whilelevel; + linenr_T lnum; + char_u *options; ++ char_u *digits; + int fraction = 0; /* init for GCC */ + int divider; + int n; +*************** +*** 6650,6655 **** +--- 6651,6657 ---- + l = options++; + if (*options == '-') + ++options; ++ digits = options; /* remember where the digits start */ + n = getdigits(&options); + divider = 0; + if (*options == '.') /* ".5s" means a fraction */ +*************** +*** 6666,6672 **** + } + if (*options == 's') /* "2s" means two times 'shiftwidth' */ + { +! if (n == 0 && fraction == 0) + n = curbuf->b_p_sw; /* just "s" is one 'shiftwidth' */ + else + { +--- 6668,6674 ---- + } + if (*options == 's') /* "2s" means two times 'shiftwidth' */ + { +! if (options == digits) + n = curbuf->b_p_sw; /* just "s" is one 'shiftwidth' */ + else + { +*** ../vim-7.3.548/src/testdir/test3.in 2012-04-05 17:17:38.000000000 +0200 +--- src/testdir/test3.in 2012-06-13 13:17:31.000000000 +0200 +*************** +*** 977,982 **** +--- 977,1000 ---- + + STARTTEST + :set cin ++ :set cino=es,n0s ++ /main ++ =][ ++ ENDTEST ++ ++ main(void) ++ { ++ /* Make sure that cino=X0s is not parsed like cino=Xs. */ ++ if (cond) ++ foo(); ++ else ++ { ++ bar(); ++ } ++ } ++ ++ STARTTEST ++ :set cin + :set cino= + ]]=][ + ENDTEST +*** ../vim-7.3.548/src/testdir/test3.ok 2012-04-05 17:17:38.000000000 +0200 +--- src/testdir/test3.ok 2012-06-13 13:17:31.000000000 +0200 +*************** +*** 940,945 **** +--- 940,957 ---- + } + + ++ main(void) ++ { ++ /* Make sure that cino=X0s is not parsed like cino=Xs. */ ++ if (cond) ++ foo(); ++ else ++ { ++ bar(); ++ } ++ } ++ ++ + { + do + { +*** ../vim-7.3.548/src/version.c 2012-06-07 21:09:35.000000000 +0200 +--- src/version.c 2012-06-13 13:37:18.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 549, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +29. Your phone bill comes to your doorstep in a box. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.550 b/7.3.550 new file mode 100644 index 0000000..6fba66c --- /dev/null +++ b/7.3.550 @@ -0,0 +1,160 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.550 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.550 (after 7.3.541) +Problem: With "j" in 'formatoptions' a list leader is not removed. (Gary + Johnson) +Solution: Don't ignore the start of a three part comment. (Lech Lorens) +Files: src/ops.c, src/testdir/test29.in, src/testdir/test29.ok + + +*** ../vim-7.3.549/src/ops.c 2012-06-07 21:09:35.000000000 +0200 +--- src/ops.c 2012-06-13 13:48:26.000000000 +0200 +*************** +*** 4250,4264 **** + return line; + + /* Find: +- * - COM_START, + * - COM_END, + * - colon, + * whichever comes first. + */ + while (*comment_flags) + { +! if (*comment_flags == COM_START +! || *comment_flags == COM_END + || *comment_flags == ':') + { + break; +--- 4250,4262 ---- + return line; + + /* Find: + * - COM_END, + * - colon, + * whichever comes first. + */ + while (*comment_flags) + { +! if (*comment_flags == COM_END + || *comment_flags == ':') + { + break; +*************** +*** 4267,4275 **** + } + + /* If we found a colon, it means that we are not processing a line +! * starting with an opening or a closing part of a three-part +! * comment. That's good, because we don't want to remove those as +! * this would be annoying. + */ + if (*comment_flags == ':' || *comment_flags == NUL) + line += lead_len; +--- 4265,4272 ---- + } + + /* If we found a colon, it means that we are not processing a line +! * starting with a closing part of a three-part comment. That's good, +! * because we don't want to remove those as this would be annoying. + */ + if (*comment_flags == ':' || *comment_flags == NUL) + line += lead_len; +*** ../vim-7.3.549/src/testdir/test29.in 2012-06-06 16:12:54.000000000 +0200 +--- src/testdir/test29.in 2012-06-13 13:48:26.000000000 +0200 +*************** +*** 103,114 **** + + STARTTEST + /^{/+1 +! :set comments=s1:/*,mb:*,ex:*/,:// + :set comments+=s1:>#,mb:#,ex:#<,:< + :set cpoptions-=j joinspaces fo=j + :set backspace=eol,start + :.,+3join + j4J + :.,+2join + j3J + :.,+2join +--- 103,117 ---- + + STARTTEST + /^{/+1 +! :set comments=sO:*\ -,mO:*\ \ ,exO:*/ +! :set comments+=s1:/*,mb:*,ex:*/,:// + :set comments+=s1:>#,mb:#,ex:#<,:< + :set cpoptions-=j joinspaces fo=j + :set backspace=eol,start + :.,+3join + j4J ++ :.,+8join ++ j9J + :.,+2join + j3J + :.,+2join +*************** +*** 132,137 **** +--- 135,158 ---- + * Make sure the previous comment leader is not removed. + */ + ++ /* List: ++ * - item1 ++ * foo bar baz ++ * foo bar baz ++ * - item2 ++ * foo bar baz ++ * foo bar baz ++ */ ++ ++ /* List: ++ * - item1 ++ * foo bar baz ++ * foo bar baz ++ * - item2 ++ * foo bar baz ++ * foo bar baz ++ */ ++ + // Should the next comment leader be left alone? + // Yes. + +*** ../vim-7.3.549/src/testdir/test29.ok 2012-06-06 16:12:54.000000000 +0200 +--- src/testdir/test29.ok 2012-06-13 13:48:26.000000000 +0200 +*************** +*** 66,71 **** +--- 66,73 ---- + { + /* Make sure the previous comment leader is not removed. */ + /* Make sure the previous comment leader is not removed. */ ++ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */ ++ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */ + // Should the next comment leader be left alone? Yes. + // Should the next comment leader be left alone? Yes. + /* Here the comment leader should be left intact. */ // And so should this one. +*** ../vim-7.3.549/src/version.c 2012-06-13 13:40:45.000000000 +0200 +--- src/version.c 2012-06-13 13:50:23.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 550, + /**/ + +-- +If you put 7 of the most talented OSS developers in a room for a week +and asked them to fix a bug in a spreadsheet program, in 1 week +you'd have 2 new mail readers and a text-based web browser. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.551 b/7.3.551 new file mode 100644 index 0000000..db8dbac --- /dev/null +++ b/7.3.551 @@ -0,0 +1,494 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.551 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.551 +Problem: When using :tablose a TabEnter autocommand is triggered too early. + (Karthick) +Solution: Don't trigger *Enter autocommands before closing the tab. + (Christian Brabandt) +Files: src/buffer.c, src/eval.c, src/ex_cmds2.c, src/fileio.c, + src/proto/window.pro, src/window.c + + +*** ../vim-7.3.550/src/buffer.c 2012-06-06 19:02:40.000000000 +0200 +--- src/buffer.c 2012-06-13 14:18:58.000000000 +0200 +*************** +*** 4470,4476 **** + * When the ":tab" modifier was used do this for all tab pages. + */ + if (had_tab > 0) +! goto_tabpage_tp(first_tabpage); + for (;;) + { + tpnext = curtab->tp_next; +--- 4470,4476 ---- + * When the ":tab" modifier was used do this for all tab pages. + */ + if (had_tab > 0) +! goto_tabpage_tp(first_tabpage, TRUE); + for (;;) + { + tpnext = curtab->tp_next; +*************** +*** 4582,4588 **** + if (!valid_tabpage(tpnext)) + tpnext = first_tabpage; /* start all over...*/ + # endif +! goto_tabpage_tp(tpnext); + } + + /* +--- 4582,4588 ---- + if (!valid_tabpage(tpnext)) + tpnext = first_tabpage; /* start all over...*/ + # endif +! goto_tabpage_tp(tpnext, TRUE); + } + + /* +*************** +*** 4686,4698 **** + if (last_curtab != new_curtab) + { + if (valid_tabpage(last_curtab)) +! goto_tabpage_tp(last_curtab); + if (win_valid(last_curwin)) + win_enter(last_curwin, FALSE); + } + /* to window with first arg */ + if (valid_tabpage(new_curtab)) +! goto_tabpage_tp(new_curtab); + if (win_valid(new_curwin)) + win_enter(new_curwin, FALSE); + +--- 4686,4698 ---- + if (last_curtab != new_curtab) + { + if (valid_tabpage(last_curtab)) +! goto_tabpage_tp(last_curtab, TRUE); + if (win_valid(last_curwin)) + win_enter(last_curwin, FALSE); + } + /* to window with first arg */ + if (valid_tabpage(new_curtab)) +! goto_tabpage_tp(new_curtab, TRUE); + if (win_valid(new_curwin)) + win_enter(new_curwin, FALSE); + +*************** +*** 4744,4750 **** + */ + #ifdef FEAT_WINDOWS + if (had_tab > 0) +! goto_tabpage_tp(first_tabpage); + for (;;) + { + #endif +--- 4744,4750 ---- + */ + #ifdef FEAT_WINDOWS + if (had_tab > 0) +! goto_tabpage_tp(first_tabpage, TRUE); + for (;;) + { + #endif +*************** +*** 4784,4790 **** + /* Without the ":tab" modifier only do the current tab page. */ + if (had_tab == 0 || tpnext == NULL) + break; +! goto_tabpage_tp(tpnext); + } + #endif + +--- 4784,4790 ---- + /* Without the ":tab" modifier only do the current tab page. */ + if (had_tab == 0 || tpnext == NULL) + break; +! goto_tabpage_tp(tpnext, TRUE); + } + #endif + +*** ../vim-7.3.550/src/eval.c 2012-06-06 16:29:06.000000000 +0200 +--- src/eval.c 2012-06-13 14:18:58.000000000 +0200 +*************** +*** 16415,16421 **** + if (tp != NULL && varname != NULL && varp != NULL) + { + save_curtab = curtab; +! goto_tabpage_tp(tp); + + tabvarname = alloc((unsigned)STRLEN(varname) + 3); + if (tabvarname != NULL) +--- 16415,16421 ---- + if (tp != NULL && varname != NULL && varp != NULL) + { + save_curtab = curtab; +! goto_tabpage_tp(tp, TRUE); + + tabvarname = alloc((unsigned)STRLEN(varname) + 3); + if (tabvarname != NULL) +*************** +*** 16428,16434 **** + + /* Restore current tabpage */ + if (valid_tabpage(save_curtab)) +! goto_tabpage_tp(save_curtab); + } + } + +--- 16428,16434 ---- + + /* Restore current tabpage */ + if (valid_tabpage(save_curtab)) +! goto_tabpage_tp(save_curtab, TRUE); + } + } + +*************** +*** 16492,16498 **** + /* set curwin to be our win, temporarily */ + save_curwin = curwin; + save_curtab = curtab; +! goto_tabpage_tp(tp); + if (!win_valid(win)) + return; + curwin = win; +--- 16492,16498 ---- + /* set curwin to be our win, temporarily */ + save_curwin = curwin; + save_curtab = curtab; +! goto_tabpage_tp(tp, TRUE); + if (!win_valid(win)) + return; + curwin = win; +*************** +*** 16527,16533 **** + /* Restore current tabpage and window, if still valid (autocomands can + * make them invalid). */ + if (valid_tabpage(save_curtab)) +! goto_tabpage_tp(save_curtab); + if (win_valid(save_curwin)) + { + curwin = save_curwin; +--- 16527,16533 ---- + /* Restore current tabpage and window, if still valid (autocomands can + * make them invalid). */ + if (valid_tabpage(save_curtab)) +! goto_tabpage_tp(save_curtab, TRUE); + if (win_valid(save_curwin)) + { + curwin = save_curwin; +*** ../vim-7.3.550/src/ex_cmds2.c 2012-04-25 17:32:14.000000000 +0200 +--- src/ex_cmds2.c 2012-06-13 14:18:58.000000000 +0200 +*************** +*** 2476,2482 **** + /* go to window "tp" */ + if (!valid_tabpage(tp)) + break; +! goto_tabpage_tp(tp); + tp = tp->tp_next; + } + #endif +--- 2476,2482 ---- + /* go to window "tp" */ + if (!valid_tabpage(tp)) + break; +! goto_tabpage_tp(tp, TRUE); + tp = tp->tp_next; + } + #endif +*** ../vim-7.3.550/src/fileio.c 2012-06-06 18:03:01.000000000 +0200 +--- src/fileio.c 2012-06-13 14:18:58.000000000 +0200 +*************** +*** 8918,8924 **** + if (wp == aucmd_win) + { + if (tp != curtab) +! goto_tabpage_tp(tp); + win_goto(aucmd_win); + goto win_found; + } +--- 8918,8924 ---- + if (wp == aucmd_win) + { + if (tp != curtab) +! goto_tabpage_tp(tp, TRUE); + win_goto(aucmd_win); + goto win_found; + } +*** ../vim-7.3.550/src/proto/window.pro 2012-02-22 14:58:24.000000000 +0100 +--- src/proto/window.pro 2012-06-13 14:23:06.000000000 +0200 +*************** +*** 27,33 **** + tabpage_T *find_tabpage __ARGS((int n)); + int tabpage_index __ARGS((tabpage_T *ftp)); + void goto_tabpage __ARGS((int n)); +! void goto_tabpage_tp __ARGS((tabpage_T *tp)); + void goto_tabpage_win __ARGS((tabpage_T *tp, win_T *wp)); + void tabpage_move __ARGS((int nr)); + void win_goto __ARGS((win_T *wp)); +--- 27,33 ---- + tabpage_T *find_tabpage __ARGS((int n)); + int tabpage_index __ARGS((tabpage_T *ftp)); + void goto_tabpage __ARGS((int n)); +! void goto_tabpage_tp __ARGS((tabpage_T *tp, int trigger_autocmds)); + void goto_tabpage_win __ARGS((tabpage_T *tp, win_T *wp)); + void tabpage_move __ARGS((int nr)); + void win_goto __ARGS((win_T *wp)); +*** ../vim-7.3.550/src/window.c 2012-06-06 19:02:40.000000000 +0200 +--- src/window.c 2012-06-13 14:24:38.000000000 +0200 +*************** +*** 45,51 **** + #if defined(FEAT_WINDOWS) || defined(PROTO) + static tabpage_T *alloc_tabpage __ARGS((void)); + static int leave_tabpage __ARGS((buf_T *new_curbuf)); +! static void enter_tabpage __ARGS((tabpage_T *tp, buf_T *old_curbuf)); + static void frame_fix_height __ARGS((win_T *wp)); + static int frame_minheight __ARGS((frame_T *topfrp, win_T *next_curwin)); + static void win_enter_ext __ARGS((win_T *wp, int undo_sync, int no_curwin)); +--- 45,51 ---- + #if defined(FEAT_WINDOWS) || defined(PROTO) + static tabpage_T *alloc_tabpage __ARGS((void)); + static int leave_tabpage __ARGS((buf_T *new_curbuf)); +! static void enter_tabpage __ARGS((tabpage_T *tp, buf_T *old_curbuf, int trigger_autocmds)); + static void frame_fix_height __ARGS((win_T *wp)); + static int frame_minheight __ARGS((frame_T *topfrp, win_T *next_curwin)); + static void win_enter_ext __ARGS((win_T *wp, int undo_sync, int no_curwin)); +*************** +*** 355,365 **** + && valid_tabpage(oldtab)) + { + newtab = curtab; +! goto_tabpage_tp(oldtab); + if (curwin == wp) + win_close(curwin, FALSE); + if (valid_tabpage(newtab)) +! goto_tabpage_tp(newtab); + } + } + break; +--- 355,365 ---- + && valid_tabpage(oldtab)) + { + newtab = curtab; +! goto_tabpage_tp(oldtab, TRUE); + if (curwin == wp) + win_close(curwin, FALSE); + if (valid_tabpage(newtab)) +! goto_tabpage_tp(newtab, TRUE); + } + } + break; +*************** +*** 2130,2137 **** + * page and then close the window and the tab page. This avoids that + * curwin and curtab are invalid while we are freeing memory, they may + * be used in GUI events. + */ +! goto_tabpage_tp(alt_tabpage()); + redraw_tabline = TRUE; + + /* Safety check: Autocommands may have closed the window when jumping +--- 2130,2139 ---- + * page and then close the window and the tab page. This avoids that + * curwin and curtab are invalid while we are freeing memory, they may + * be used in GUI events. ++ * Don't trigger autocommands yet, they may use wrong values, so do ++ * that below. + */ +! goto_tabpage_tp(alt_tabpage(), FALSE); + redraw_tabline = TRUE; + + /* Safety check: Autocommands may have closed the window when jumping +*************** +*** 2144,2149 **** +--- 2146,2157 ---- + if (h != tabline_height()) + shell_new_rows(); + } ++ /* Since goto_tabpage_tp above did not trigger *Enter autocommands, do ++ * that now. */ ++ #ifdef FEAT_AUTOCMD ++ apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf); ++ apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf); ++ #endif + return TRUE; + } + return FALSE; +*************** +*** 3556,3562 **** + } + + /* Failed, get back the previous Tab page */ +! enter_tabpage(curtab, curbuf); + return FAIL; + } + +--- 3564,3570 ---- + } + + /* Failed, get back the previous Tab page */ +! enter_tabpage(curtab, curbuf, TRUE); + return FAIL; + } + +*************** +*** 3709,3719 **** + /* + * Start using tab page "tp". + * Only to be used after leave_tabpage() or freeing the current tab page. + */ + static void +! enter_tabpage(tp, old_curbuf) + tabpage_T *tp; + buf_T *old_curbuf UNUSED; + { + int old_off = tp->tp_firstwin->w_winrow; + win_T *next_prevwin = tp->tp_prevwin; +--- 3717,3729 ---- + /* + * Start using tab page "tp". + * Only to be used after leave_tabpage() or freeing the current tab page. ++ * Only trigger *Enter autocommands when trigger_autocmds is TRUE. + */ + static void +! enter_tabpage(tp, old_curbuf, trigger_autocmds) + tabpage_T *tp; + buf_T *old_curbuf UNUSED; ++ int trigger_autocmds; + { + int old_off = tp->tp_firstwin->w_winrow; + win_T *next_prevwin = tp->tp_prevwin; +*************** +*** 3761,3769 **** + #ifdef FEAT_AUTOCMD + /* Apply autocommands after updating the display, when 'rows' and + * 'columns' have been set correctly. */ +! apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf); +! if (old_curbuf != curbuf) +! apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf); + #endif + + redraw_all_later(CLEAR); +--- 3771,3782 ---- + #ifdef FEAT_AUTOCMD + /* Apply autocommands after updating the display, when 'rows' and + * 'columns' have been set correctly. */ +! if (trigger_autocmds) +! { +! apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf); +! if (old_curbuf != curbuf) +! apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf); +! } + #endif + + redraw_all_later(CLEAR); +*************** +*** 3839,3845 **** + } + } + +! goto_tabpage_tp(tp); + + #ifdef FEAT_GUI_TABLINE + if (gui_use_tabline()) +--- 3852,3858 ---- + } + } + +! goto_tabpage_tp(tp, TRUE); + + #ifdef FEAT_GUI_TABLINE + if (gui_use_tabline()) +*************** +*** 3849,3859 **** + + /* + * Go to tabpage "tp". + * Note: doesn't update the GUI tab. + */ + void +! goto_tabpage_tp(tp) + tabpage_T *tp; + { + /* Don't repeat a message in another tab page. */ + set_keep_msg(NULL, 0); +--- 3862,3874 ---- + + /* + * Go to tabpage "tp". ++ * Only trigger *Enter autocommands when trigger_autocmds is TRUE. + * Note: doesn't update the GUI tab. + */ + void +! goto_tabpage_tp(tp, trigger_autocmds) + tabpage_T *tp; ++ int trigger_autocmds; + { + /* Don't repeat a message in another tab page. */ + set_keep_msg(NULL, 0); +*************** +*** 3861,3869 **** + if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer) == OK) + { + if (valid_tabpage(tp)) +! enter_tabpage(tp, curbuf); + else +! enter_tabpage(curtab, curbuf); + } + } + +--- 3876,3884 ---- + if (tp != curtab && leave_tabpage(tp->tp_curwin->w_buffer) == OK) + { + if (valid_tabpage(tp)) +! enter_tabpage(tp, curbuf, trigger_autocmds); + else +! enter_tabpage(curtab, curbuf, trigger_autocmds); + } + } + +*************** +*** 3876,3882 **** + tabpage_T *tp; + win_T *wp; + { +! goto_tabpage_tp(tp); + if (curtab == tp && win_valid(wp)) + { + win_enter(wp, TRUE); +--- 3891,3897 ---- + tabpage_T *tp; + win_T *wp; + { +! goto_tabpage_tp(tp, TRUE); + if (curtab == tp && win_valid(wp)) + { + win_enter(wp, TRUE); +*** ../vim-7.3.550/src/version.c 2012-06-13 14:01:36.000000000 +0200 +--- src/version.c 2012-06-13 14:28:00.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 551, + /**/ + +-- +Give a man a computer program and you give him a headache, +but teach him to program computers and you give him the power +to create headaches for others for the rest of his life... + R. B. Forest + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.552 b/7.3.552 new file mode 100644 index 0000000..e9a560e --- /dev/null +++ b/7.3.552 @@ -0,0 +1,582 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.552 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.552 +Problem: Formatting inside comments does not use the "2" flag in + 'formatoptions'. +Solution: Support the "2" flag. (Tor Perkins) +Files: src/vim.h, src/ops.c, src/edit.c, src/misc1.c, + src/testdir/test68.in, src/testdir/test68.ok + + +*** ../vim-7.3.551/src/vim.h 2012-06-06 18:03:01.000000000 +0200 +--- src/vim.h 2012-06-13 16:07:27.000000000 +0200 +*************** +*** 1072,1083 **** +--- 1072,1085 ---- + #define INSCHAR_DO_COM 2 /* format comments */ + #define INSCHAR_CTRLV 4 /* char typed just after CTRL-V */ + #define INSCHAR_NO_FEX 8 /* don't use 'formatexpr' */ ++ #define INSCHAR_COM_LIST 16 /* format comments with list/2nd line indent */ + + /* flags for open_line() */ + #define OPENLINE_DELSPACES 1 /* delete spaces after cursor */ + #define OPENLINE_DO_COM 2 /* format comments */ + #define OPENLINE_KEEPTRAIL 4 /* keep trailing spaces */ + #define OPENLINE_MARKFIX 8 /* fix mark positions */ ++ #define OPENLINE_COM_LIST 16 /* format comments with list/2nd line indent */ + + /* + * There are four history tables: +*** ../vim-7.3.551/src/ops.c 2012-06-13 14:01:36.000000000 +0200 +--- src/ops.c 2012-06-13 16:53:44.000000000 +0200 +*************** +*** 1727,1734 **** + * and the delete is within one line. */ + if (( + #ifdef FEAT_CLIPBOARD +! ((clip_unnamed & CLIP_UNNAMED) && oap->regname == '*') || +! ((clip_unnamed & CLIP_UNNAMED_PLUS) && oap->regname == '+') || + #endif + oap->regname == 0) && oap->motion_type != MLINE + && oap->line_count == 1) +--- 1727,1734 ---- + * and the delete is within one line. */ + if (( + #ifdef FEAT_CLIPBOARD +! ((clip_unnamed & CLIP_UNNAMED) && oap->regname == '*') || +! ((clip_unnamed & CLIP_UNNAMED_PLUS) && oap->regname == '+') || + #endif + oap->regname == 0) && oap->motion_type != MLINE + && oap->line_count == 1) +*************** +*** 4208,4217 **** + * "is_comment". + * line - line to be processed, + * process - if FALSE, will only check whether the line ends with an unclosed +! * comment, + * include_space - whether to also skip space following the comment leader, + * is_comment - will indicate whether the current line ends with an unclosed +! * comment. + */ + static char_u * + skip_comment(line, process, include_space, is_comment) +--- 4208,4217 ---- + * "is_comment". + * line - line to be processed, + * process - if FALSE, will only check whether the line ends with an unclosed +! * comment, + * include_space - whether to also skip space following the comment leader, + * is_comment - will indicate whether the current line ends with an unclosed +! * comment. + */ + static char_u * + skip_comment(line, process, include_space, is_comment) +*************** +*** 4723,4731 **** + char_u *leader_flags = NULL; /* flags for leader of current line */ + char_u *next_leader_flags; /* flags for leader of next line */ + int do_comments; /* format comments */ + #endif + int advance = TRUE; +! int second_indent = -1; + int do_second_indent; + int do_number_indent; + int do_trail_white; +--- 4723,4733 ---- + char_u *leader_flags = NULL; /* flags for leader of current line */ + char_u *next_leader_flags; /* flags for leader of next line */ + int do_comments; /* format comments */ ++ int do_comments_list = 0; /* format comments with 'n' or '2' */ + #endif + int advance = TRUE; +! int second_indent = -1; /* indent for second line (comment +! * aware) */ + int do_second_indent; + int do_number_indent; + int do_trail_white; +*************** +*** 4828,4845 **** + if (first_par_line + && (do_second_indent || do_number_indent) + && prev_is_end_par +! && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count + #ifdef FEAT_COMMENTS +! && leader_len == 0 +! && next_leader_len == 0 + #endif +! ) +! { +! if (do_second_indent +! && !lineempty(curwin->w_cursor.lnum + 1)) +! second_indent = get_indent_lnum(curwin->w_cursor.lnum + 1); + else if (do_number_indent) +! second_indent = get_number_indent(curwin->w_cursor.lnum); + } + + /* +--- 4830,4875 ---- + if (first_par_line + && (do_second_indent || do_number_indent) + && prev_is_end_par +! && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count) +! { +! if (do_second_indent && !lineempty(curwin->w_cursor.lnum + 1)) +! { + #ifdef FEAT_COMMENTS +! if (leader_len == 0 && next_leader_len == 0) +! { +! /* no comment found */ + #endif +! second_indent = +! get_indent_lnum(curwin->w_cursor.lnum + 1); +! #ifdef FEAT_COMMENTS +! } +! else +! { +! second_indent = next_leader_len; +! do_comments_list = 1; +! } +! #endif +! } + else if (do_number_indent) +! { +! #ifdef FEAT_COMMENTS +! if (leader_len == 0 && next_leader_len == 0) +! { +! /* no comment found */ +! #endif +! second_indent = +! get_number_indent(curwin->w_cursor.lnum); +! #ifdef FEAT_COMMENTS +! } +! else +! { +! /* get_number_indent() is now "comment aware"... */ +! second_indent = +! get_number_indent(curwin->w_cursor.lnum); +! do_comments_list = 1; +! } +! #endif +! } + } + + /* +*************** +*** 4878,4883 **** +--- 4908,4915 ---- + insertchar(NUL, INSCHAR_FORMAT + #ifdef FEAT_COMMENTS + + (do_comments ? INSCHAR_DO_COM : 0) ++ + (do_comments && do_comments_list ++ ? INSCHAR_COM_LIST : 0) + #endif + + (avoid_fex ? INSCHAR_NO_FEX : 0), second_indent); + State = old_State; +*** ../vim-7.3.551/src/edit.c 2012-06-06 16:12:54.000000000 +0200 +--- src/edit.c 2012-06-13 16:54:10.000000000 +0200 +*************** +*** 1463,1469 **** + * what check_abbr() expects. */ + (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) : + #endif +! c) && c != Ctrl_RSB)) + { + insert_special(c, FALSE, FALSE); + #ifdef FEAT_RIGHTLEFT +--- 1463,1469 ---- + * what check_abbr() expects. */ + (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) : + #endif +! c) && c != Ctrl_RSB)) + { + insert_special(c, FALSE, FALSE); + #ifdef FEAT_RIGHTLEFT +*************** +*** 5769,5774 **** +--- 5769,5784 ---- + # define WHITECHAR(cc) vim_iswhite(cc) + #endif + ++ /* ++ * "flags": INSCHAR_FORMAT - force formatting ++ * INSCHAR_CTRLV - char typed just after CTRL-V ++ * INSCHAR_NO_FEX - don't use 'formatexpr' ++ * ++ * NOTE: passes the flags value straight through to internal_format() which, ++ * beside INSCHAR_FORMAT (above), is also looking for these: ++ * INSCHAR_DO_COM - format comments ++ * INSCHAR_COM_LIST - format comments with num list or 2nd line indent ++ */ + void + insertchar(c, flags, second_indent) + int c; /* character to insert or NUL */ +*************** +*** 6011,6016 **** +--- 6021,6029 ---- + + /* + * Format text at the current insert position. ++ * ++ * If the INSCHAR_COM_LIST flag is present, then the value of second_indent ++ * will be the comment leader length sent to open_line(). + */ + static void + internal_format(textwidth, second_indent, flags, format_only, c) +*************** +*** 6289,6311 **** + + (fo_white_par ? OPENLINE_KEEPTRAIL : 0) + #ifdef FEAT_COMMENTS + + (do_comments ? OPENLINE_DO_COM : 0) + #endif +! , old_indent); +! old_indent = 0; + + replace_offset = 0; + if (first_line) + { +! if (second_indent < 0 && has_format_option(FO_Q_NUMBER)) +! second_indent = get_number_indent(curwin->w_cursor.lnum -1); +! if (second_indent >= 0) + { + #ifdef FEAT_VREPLACE +! if (State & VREPLACE_FLAG) +! change_indent(INDENT_SET, second_indent, FALSE, NUL, TRUE); +! else + #endif +! (void)set_indent(second_indent, SIN_CHANGED); + } + first_line = FALSE; + } +--- 6302,6337 ---- + + (fo_white_par ? OPENLINE_KEEPTRAIL : 0) + #ifdef FEAT_COMMENTS + + (do_comments ? OPENLINE_DO_COM : 0) ++ + ((flags & INSCHAR_COM_LIST) ? OPENLINE_COM_LIST : 0) + #endif +! , ((flags & INSCHAR_COM_LIST) ? second_indent : old_indent)); +! if (!(flags & INSCHAR_COM_LIST)) +! old_indent = 0; + + replace_offset = 0; + if (first_line) + { +! if (!(flags & INSCHAR_COM_LIST)) + { ++ /* ++ * This section is for numeric lists w/o comments. If comment ++ * indents are needed with numeric lists (formatoptions=nq), ++ * then the INSCHAR_COM_LIST flag will cause the corresponding ++ * OPENLINE_COM_LIST flag to be passed through to open_line() ++ * (as seen above)... ++ */ ++ if (second_indent < 0 && has_format_option(FO_Q_NUMBER)) ++ second_indent = get_number_indent(curwin->w_cursor.lnum -1); ++ if (second_indent >= 0) ++ { + #ifdef FEAT_VREPLACE +! if (State & VREPLACE_FLAG) +! change_indent(INDENT_SET, second_indent, +! FALSE, NUL, TRUE); +! else + #endif +! (void)set_indent(second_indent, SIN_CHANGED); +! } + } + first_line = FALSE; + } +*** ../vim-7.3.551/src/misc1.c 2012-06-13 13:40:45.000000000 +0200 +--- src/misc1.c 2012-06-13 16:54:59.000000000 +0200 +*************** +*** 423,449 **** + { + colnr_T col; + pos_T pos; +- regmmatch_T regmatch; + + if (lnum > curbuf->b_ml.ml_line_count) + return -1; + pos.lnum = 0; +! regmatch.regprog = vim_regcomp(curbuf->b_p_flp, RE_MAGIC); +! if (regmatch.regprog != NULL) + { +! regmatch.rmm_ic = FALSE; +! regmatch.rmm_maxcol = 0; +! if (vim_regexec_multi(®match, curwin, curbuf, lnum, +! (colnr_T)0, NULL)) + { +! pos.lnum = regmatch.endpos[0].lnum + lnum; +! pos.col = regmatch.endpos[0].col; + #ifdef FEAT_VIRTUALEDIT +! pos.coladd = 0; + #endif + } + vim_free(regmatch.regprog); + } + + if (pos.lnum == 0 || *ml_get_pos(&pos) == NUL) + return -1; +--- 423,492 ---- + { + colnr_T col; + pos_T pos; + + if (lnum > curbuf->b_ml.ml_line_count) + return -1; + pos.lnum = 0; +! +! #ifdef FEAT_COMMENTS +! if (has_format_option(FO_Q_COMS) && has_format_option(FO_Q_NUMBER)) + { +! regmatch_T regmatch; +! int lead_len; /* length of comment leader */ +! +! lead_len = get_leader_len(ml_get(lnum), NULL, FALSE, TRUE); +! regmatch.regprog = vim_regcomp(curbuf->b_p_flp, RE_MAGIC); +! if (regmatch.regprog != NULL) + { +! regmatch.rm_ic = FALSE; +! +! /* vim_regexec() expects a pointer to a line. This lets us +! * start matching for the flp beyond any comment leader... */ +! if (vim_regexec(®match, ml_get(lnum) + lead_len, (colnr_T)0)) +! { +! pos.lnum = lnum; +! pos.col = *regmatch.endp - (ml_get(lnum) + lead_len); +! pos.col += lead_len; + #ifdef FEAT_VIRTUALEDIT +! pos.coladd = 0; + #endif ++ } + } + vim_free(regmatch.regprog); + } ++ else ++ { ++ /* ++ * What follows is the orig code that is not "comment aware"... ++ * ++ * I'm not sure if regmmatch_T (multi-match) is needed in this case. ++ * It may be true that this section would work properly using the ++ * regmatch_T code above, in which case, these two seperate sections ++ * should be consolidated w/ FEAT_COMMENTS making lead_len > 0... ++ */ ++ #endif ++ regmmatch_T regmatch; ++ ++ regmatch.regprog = vim_regcomp(curbuf->b_p_flp, RE_MAGIC); ++ ++ if (regmatch.regprog != NULL) ++ { ++ regmatch.rmm_ic = FALSE; ++ regmatch.rmm_maxcol = 0; ++ if (vim_regexec_multi(®match, curwin, curbuf, ++ lnum, (colnr_T)0, NULL)) ++ { ++ pos.lnum = regmatch.endpos[0].lnum + lnum; ++ pos.col = regmatch.endpos[0].col; ++ #ifdef FEAT_VIRTUALEDIT ++ pos.coladd = 0; ++ #endif ++ } ++ vim_free(regmatch.regprog); ++ } ++ #ifdef FEAT_COMMENTS ++ } ++ #endif + + if (pos.lnum == 0 || *ml_get_pos(&pos) == NUL) + return -1; +*************** +*** 502,515 **** + * OPENLINE_DO_COM format comments + * OPENLINE_KEEPTRAIL keep trailing spaces + * OPENLINE_MARKFIX adjust mark positions after the line break + * + * Return TRUE for success, FALSE for failure + */ + int +! open_line(dir, flags, old_indent) + int dir; /* FORWARD or BACKWARD */ + int flags; +! int old_indent; /* indent for after ^^D in Insert mode */ + { + char_u *saved_line; /* copy of the original line */ + char_u *next_line = NULL; /* copy of the next line */ +--- 545,562 ---- + * OPENLINE_DO_COM format comments + * OPENLINE_KEEPTRAIL keep trailing spaces + * OPENLINE_MARKFIX adjust mark positions after the line break ++ * OPENLINE_COM_LIST format comments with list or 2nd line indent ++ * ++ * "second_line_indent": indent for after ^^D in Insert mode or if flag ++ * OPENLINE_COM_LIST + * + * Return TRUE for success, FALSE for failure + */ + int +! open_line(dir, flags, second_line_indent) + int dir; /* FORWARD or BACKWARD */ + int flags; +! int second_line_indent; + { + char_u *saved_line; /* copy of the original line */ + char_u *next_line = NULL; /* copy of the next line */ +*************** +*** 650,657 **** + * count white space on current line + */ + newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts); +! if (newindent == 0) +! newindent = old_indent; /* for ^^D command in insert mode */ + + #ifdef FEAT_SMARTINDENT + /* +--- 697,704 ---- + * count white space on current line + */ + newindent = get_indent_str(saved_line, (int)curbuf->b_p_ts); +! if (newindent == 0 && !(flags & OPENLINE_COM_LIST)) +! newindent = second_line_indent; /* for ^^D command in insert mode */ + + #ifdef FEAT_SMARTINDENT + /* +*************** +*** 1008,1015 **** + if (lead_len) + { + /* allocate buffer (may concatenate p_exta later) */ +! leader = alloc(lead_len + lead_repl_len + extra_space + +! extra_len + 1); + allocated = leader; /* remember to free it later */ + + if (leader == NULL) +--- 1055,1062 ---- + if (lead_len) + { + /* allocate buffer (may concatenate p_exta later) */ +! leader = alloc(lead_len + lead_repl_len + extra_space + extra_len +! + (second_line_indent > 0 ? second_line_indent : 0)); + allocated = leader; /* remember to free it later */ + + if (leader == NULL) +*************** +*** 1304,1309 **** +--- 1351,1370 ---- + /* concatenate leader and p_extra, if there is a leader */ + if (lead_len) + { ++ if (flags & OPENLINE_COM_LIST && second_line_indent > 0) ++ { ++ int i; ++ int padding = second_line_indent - (newindent + STRLEN(leader)); ++ ++ /* Here whitespace is inserted after the comment char. ++ * Below, set_indent(newindent, SIN_INSERT) will insert the ++ * whitespace needed before the comment char. */ ++ for (i = 0; i < padding; i++) ++ { ++ STRCAT(leader, " "); ++ newcol++; ++ } ++ } + STRCAT(leader, p_extra); + p_extra = leader; + did_ai = TRUE; /* So truncating blanks works with comments */ +*************** +*** 4966,4973 **** + char_u * + FullName_save(fname, force) + char_u *fname; +! int force; /* force expansion, even when it already looks +! like a full path name */ + { + char_u *buf; + char_u *new_fname = NULL; +--- 5027,5034 ---- + char_u * + FullName_save(fname, force) + char_u *fname; +! int force; /* force expansion, even when it already looks +! * like a full path name */ + { + char_u *buf; + char_u *new_fname = NULL; +*** ../vim-7.3.551/src/testdir/test68.in 2010-10-09 17:21:42.000000000 +0200 +--- src/testdir/test68.in 2012-06-13 15:49:38.000000000 +0200 +*************** +*** 51,56 **** +--- 51,77 ---- + } + + STARTTEST ++ /^{/+1 ++ :set tw=5 fo=qn comments=:# ++ gwap ++ ENDTEST ++ ++ { ++ # 1 a b ++ } ++ ++ STARTTEST ++ /^{/+1 ++ :set tw=5 fo=q2 comments=:# ++ gwap ++ ENDTEST ++ ++ { ++ # x ++ # a b ++ } ++ ++ STARTTEST + /^{/+2 + :set tw& fo=a + I^^ +*** ../vim-7.3.551/src/testdir/test68.ok 2010-10-09 17:21:42.000000000 +0200 +--- src/testdir/test68.ok 2012-06-13 15:49:38.000000000 +0200 +*************** +*** 34,38 **** +--- 34,50 ---- + } + + ++ { ++ # 1 a ++ # b ++ } ++ ++ ++ { ++ # x a ++ # b ++ } ++ ++ + { 1aa ^^2bb } + +*** ../vim-7.3.551/src/version.c 2012-06-13 14:28:16.000000000 +0200 +--- src/version.c 2012-06-13 16:36:14.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 552, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +31. You code your homework in HTML and give your instructor the URL. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.553 b/7.3.553 new file mode 100644 index 0000000..82c757e --- /dev/null +++ b/7.3.553 @@ -0,0 +1,85 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.553 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.553 +Problem: With double-width characters and 'listchars' containing "precedes" + the text is displayed one cell off. +Solution: Check for double-width character being overwritten by the + "precedes" character. (Yasuhiro Matsumoto) +Files: src/screen.c + + +*** ../vim-7.3.552/src/screen.c 2012-06-06 19:05:45.000000000 +0200 +--- src/screen.c 2012-06-13 17:55:10.000000000 +0200 +*************** +*** 89,94 **** +--- 89,97 ---- + + #include "vim.h" + ++ #define MB_FILLER_CHAR '<' /* character used when a double-width character ++ * doesn't fit. */ ++ + /* + * The attributes that are actually active for writing to the screen. + */ +*************** +*** 4016,4022 **** + if (n_skip > 0 && mb_l > 1 && n_extra == 0) + { + n_extra = 1; +! c_extra = '<'; + c = ' '; + if (area_attr == 0 && search_attr == 0) + { +--- 4019,4025 ---- + if (n_skip > 0 && mb_l > 1 && n_extra == 0) + { + n_extra = 1; +! c_extra = MB_FILLER_CHAR; + c = ' '; + if (area_attr == 0 && search_attr == 0) + { +*************** +*** 4576,4581 **** +--- 4579,4593 ---- + c = lcs_prec; + lcs_prec_todo = NUL; + #ifdef FEAT_MBYTE ++ if (has_mbyte && (*mb_char2cells)(mb_c) > 1) ++ { ++ /* Double-width character being overwritten by the "precedes" ++ * character, need to fill up half the character. */ ++ c_extra = MB_FILLER_CHAR; ++ n_extra = 1; ++ n_attr = 2; ++ extra_attr = hl_attr(HLF_AT); ++ } + mb_c = c; + if (enc_utf8 && (*mb_char2len)(c) > 1) + { +*** ../vim-7.3.552/src/version.c 2012-06-13 17:28:51.000000000 +0200 +--- src/version.c 2012-06-13 17:48:45.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 553, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +32. You don't know what sex three of your closest friends are, because they + have neutral nicknames and you never bothered to ask. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.554 b/7.3.554 new file mode 100644 index 0000000..e8d4d37 --- /dev/null +++ b/7.3.554 @@ -0,0 +1,52 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.554 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.554 (after 7.3.551) +Problem: Compiler warning for unused argument. +Solution: Add UNUSED. +Files: src/window.c + + +*** ../vim-7.3.553/src/window.c 2012-06-13 14:28:16.000000000 +0200 +--- src/window.c 2012-06-13 17:46:49.000000000 +0200 +*************** +*** 3723,3729 **** + enter_tabpage(tp, old_curbuf, trigger_autocmds) + tabpage_T *tp; + buf_T *old_curbuf UNUSED; +! int trigger_autocmds; + { + int old_off = tp->tp_firstwin->w_winrow; + win_T *next_prevwin = tp->tp_prevwin; +--- 3723,3729 ---- + enter_tabpage(tp, old_curbuf, trigger_autocmds) + tabpage_T *tp; + buf_T *old_curbuf UNUSED; +! int trigger_autocmds UNUSED; + { + int old_off = tp->tp_firstwin->w_winrow; + win_T *next_prevwin = tp->tp_prevwin; +*** ../vim-7.3.553/src/version.c 2012-06-13 18:06:32.000000000 +0200 +--- src/version.c 2012-06-13 18:15:08.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 554, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +33. You name your children Eudora, Mozilla and Dotcom. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.555 b/7.3.555 new file mode 100644 index 0000000..acb6845 --- /dev/null +++ b/7.3.555 @@ -0,0 +1,232 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.555 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.555 +Problem: Building on IBM z/OS fails. +Solution: Adjust configure. Use the QUOTESED value from config.mk instead of + the hard coded one in Makefile. (Stephen Bovy) +Files: src/configure.in, src/auto/configure, src/Makefile + + +*** ../vim-7.3.554/src/configure.in 2012-02-05 22:51:27.000000000 +0100 +--- src/configure.in 2012-06-13 18:52:11.000000000 +0200 +*************** +*** 329,343 **** + echo "" + echo "------------------------------------------" + echo " On z/OS Unix, the environment variable" +! echo " __CC_${ccn}MODE must be set to \"1\"!" + echo " Do:" + echo " export _CC_${ccn}MODE=1" + echo " and then call configure again." + echo "------------------------------------------" + exit 1 + fi +! CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float\\(IEEE\\)"; +! LDFLAGS="$LDFLAGS -Wl,EDIT=NO" + AC_MSG_RESULT(yes) + ;; + *) zOSUnix="no"; +--- 329,346 ---- + echo "" + echo "------------------------------------------" + echo " On z/OS Unix, the environment variable" +! echo " _CC_${ccn}MODE must be set to \"1\"!" + echo " Do:" + echo " export _CC_${ccn}MODE=1" + echo " and then call configure again." + echo "------------------------------------------" + exit 1 + fi +! # Set CFLAGS for configure process. +! # This will be reset later for config.mk. +! # Use haltonmsg to force error for missing H files. +! CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)"; +! LDFLAGS="$LDFLAGS -Wl,EDIT=NO" + AC_MSG_RESULT(yes) + ;; + *) zOSUnix="no"; +*************** +*** 2378,2387 **** + if test -z "$SKIP_MOTIF"; then + cppflags_save=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $X_CFLAGS" +! AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \ +! Xm/UnhighlightT.h Xm/Notebook.h) + +! if test $ac_cv_header_Xm_XpmP_h = yes; then + dnl Solaris uses XpmAttributes_21, very annoying. + AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) + AC_TRY_COMPILE([#include ], [XpmAttributes_21 attr;], +--- 2381,2395 ---- + if test -z "$SKIP_MOTIF"; then + cppflags_save=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $X_CFLAGS" +! if test "$zOSUnix" = "yes"; then +! xmheader="Xm/Xm.h" +! else +! xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h +! Xm/UnhighlightT.h Xm/Notebook.h" +! fi +! AC_CHECK_HEADERS($xmheader) + +! if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then + dnl Solaris uses XpmAttributes_21, very annoying. + AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) + AC_TRY_COMPILE([#include ], [XpmAttributes_21 attr;], +*************** +*** 3642,3647 **** +--- 3650,3660 ---- + fi + AC_SUBST(LINK_AS_NEEDED) + ++ # IBM z/OS reset CFLAGS for config.mk ++ if test "$zOSUnix" = "yes"; then ++ CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll" ++ fi ++ + dnl write output files + AC_OUTPUT(auto/config.mk:config.mk.in) + +*** ../vim-7.3.554/src/auto/configure 2012-02-05 22:51:27.000000000 +0100 +--- src/auto/configure 2012-06-13 18:53:04.000000000 +0200 +*************** +*** 4426,4440 **** + echo "" + echo "------------------------------------------" + echo " On z/OS Unix, the environment variable" +! echo " __CC_${ccn}MODE must be set to \"1\"!" + echo " Do:" + echo " export _CC_${ccn}MODE=1" + echo " and then call configure again." + echo "------------------------------------------" + exit 1 + fi +! CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float\\(IEEE\\)"; +! LDFLAGS="$LDFLAGS -Wl,EDIT=NO" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + ;; +--- 4426,4443 ---- + echo "" + echo "------------------------------------------" + echo " On z/OS Unix, the environment variable" +! echo " _CC_${ccn}MODE must be set to \"1\"!" + echo " Do:" + echo " export _CC_${ccn}MODE=1" + echo " and then call configure again." + echo "------------------------------------------" + exit 1 + fi +! # Set CFLAGS for configure process. +! # This will be reset later for config.mk. +! # Use haltonmsg to force error for missing H files. +! CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)"; +! LDFLAGS="$LDFLAGS -Wl,EDIT=NO" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + ;; +*************** +*** 8697,8704 **** + if test -z "$SKIP_MOTIF"; then + cppflags_save=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $X_CFLAGS" +! for ac_header in Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \ +! Xm/UnhighlightT.h Xm/Notebook.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +--- 8700,8712 ---- + if test -z "$SKIP_MOTIF"; then + cppflags_save=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $X_CFLAGS" +! if test "$zOSUnix" = "yes"; then +! xmheader="Xm/Xm.h" +! else +! xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h +! Xm/UnhighlightT.h Xm/Notebook.h" +! fi +! for ac_header in $xmheader + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +*************** +*** 8713,8719 **** + done + + +! if test $ac_cv_header_Xm_XpmP_h = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5 + $as_echo_n "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +--- 8721,8727 ---- + done + + +! if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5 + $as_echo_n "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +*************** +*** 12590,12595 **** +--- 12598,12608 ---- + fi + + ++ # IBM z/OS reset CFLAGS for config.mk ++ if test "$zOSUnix" = "yes"; then ++ CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll" ++ fi ++ + ac_config_files="$ac_config_files auto/config.mk:config.mk.in" + + cat >confcache <<\_ACEOF +*** ../vim-7.3.554/src/Makefile 2012-03-28 17:17:45.000000000 +0200 +--- src/Makefile 2012-06-13 18:48:13.000000000 +0200 +*************** +*** 875,880 **** +--- 875,884 ---- + #CFLAGS = -O -Qtarget=m88110compat + #EXTRA_LIBS = -lgen + ++ # The value of QUOTESED comes from auto/config.mk. ++ # Uncomment the next line to use the default value. ++ # QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/' ++ + ##################### end of system specific lines ################### }}} + + ### Names of the programs and targets {{{1 +*************** +*** 2411,2417 **** + auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in + CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh + +- QUOTESED = sed -e 's/[\\"]/\\&/g' -e 's/\\"/"/' -e 's/\\";$$/";/' + auto/pathdef.c: Makefile auto/config.mk + -@echo creating $@ + -@echo '/* pathdef.c */' > $@ +--- 2415,2420 ---- +*** ../vim-7.3.554/src/version.c 2012-06-13 18:15:13.000000000 +0200 +--- src/version.c 2012-06-13 19:13:54.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 555, + /**/ + +-- +My sister Cecilia opened a computer store in Hawaii. +She sells C shells by the seashore. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/7.3.556 b/7.3.556 new file mode 100644 index 0000000..068b8d1 --- /dev/null +++ b/7.3.556 @@ -0,0 +1,70 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.3.556 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.3.556 +Problem: Compiler warnings on 64 bit Windows. +Solution: Add type casts. (Mike Williams) +Files: src/misc1.c + + +*** ../vim-7.3.555/src/misc1.c 2012-06-13 17:28:51.000000000 +0200 +--- src/misc1.c 2012-06-14 20:55:47.000000000 +0200 +*************** +*** 445,452 **** + if (vim_regexec(®match, ml_get(lnum) + lead_len, (colnr_T)0)) + { + pos.lnum = lnum; +! pos.col = *regmatch.endp - (ml_get(lnum) + lead_len); +! pos.col += lead_len; + #ifdef FEAT_VIRTUALEDIT + pos.coladd = 0; + #endif +--- 445,451 ---- + if (vim_regexec(®match, ml_get(lnum) + lead_len, (colnr_T)0)) + { + pos.lnum = lnum; +! pos.col = (colnr_T)(*regmatch.endp - ml_get(lnum)); + #ifdef FEAT_VIRTUALEDIT + pos.coladd = 0; + #endif +*************** +*** 1354,1360 **** + if (flags & OPENLINE_COM_LIST && second_line_indent > 0) + { + int i; +! int padding = second_line_indent - (newindent + STRLEN(leader)); + + /* Here whitespace is inserted after the comment char. + * Below, set_indent(newindent, SIN_INSERT) will insert the +--- 1353,1360 ---- + if (flags & OPENLINE_COM_LIST && second_line_indent > 0) + { + int i; +! int padding = second_line_indent +! - (newindent + (int)STRLEN(leader)); + + /* Here whitespace is inserted after the comment char. + * Below, set_indent(newindent, SIN_INSERT) will insert the +*** ../vim-7.3.555/src/version.c 2012-06-13 19:19:36.000000000 +0200 +--- src/version.c 2012-06-14 20:54:59.000000000 +0200 +*************** +*** 716,717 **** +--- 716,719 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 556, + /**/ + +-- +He who laughs last, thinks slowest. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ an exciting new programming language -- http://www.Zimbu.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org /// diff --git a/README.patches b/README.patches index e0e5ed7..c904537 100644 --- a/README.patches +++ b/README.patches @@ -546,3 +546,44 @@ Individual patches for Vim 7.3: 3925 7.3.513 cannot use CTRL-E and CTRL-Y with "r" 7792 7.3.514 no completion for :history command 2073 7.3.515 'wildignorecase' only applies to the last part of the path + 2784 7.3.516 extend(o, o) may crash Vim + 1718 7.3.517 crash when using "vipvv" + 1976 7.3.518 ":helptags" cannot find tag when 'encoding' is double-byte + 1894 7.3.519 completefunction cannot indicate end of completion mode + 4238 7.3.520 Gvim starts up slow on Unbuntu 12.04 + 3388 7.3.521 spell checking may crash when using multi-byte characters + 1885 7.3.522 crash in vim_realloc() when using MEM_PROFILE + 3493 7.3.523 ":diffupdate" doesn't check for files changed elsewhere + 1271 7.3.524 missing comma in version.c + 1884 7.3.525 compiler warning on 64 bit MS-Windows + 1950 7.3.526 confusing indenting for #ifdef + 4408 7.3.527 clang complains about non-ASCII characters in a string + 5919 7.3.528 crash when closing last window in a tab + 2439 7.3.529 using a count before "v" and "V" does not work + 1559 7.3.530 (after 7.3.520) gvim does not work when 'guioptions' has "f" + 1546 7.3.531 (after 7.3.530) GUI does not work on MS-Windows + 1685 7.3.532 compiler warning from Clang + 1323 7.3.533 memory leak when writing undo file + 2944 7.3.534 (after 7.3.461) autoindent fails with InsertCharPre autocmd + 8436 7.3.535 many #ifdefs for MB_MAXBYTES + 2014 7.3.536 German sharp s is not seen as a word character + 1352 7.3.537 unecessary call to init_spell_chartab() + 9735 7.3.538 'efm' does not handle Tabs in pointer lines + 1625 7.3.539 redraw multi-byte char on command line does not work properly + 1658 7.3.540 cursor is left on the text instead of the command line + 31063 7.3.541 when joining lines comment leaders need to be removed manually + 2240 7.3.542 (after 7.3.506) function is sometimes unused + 1632 7.3.543 the cursor is in the wrong line after using ":copen" + 3088 7.3.544 no autocommand for :quit before deciding to exit + 10435 7.3.545 autocommands may close a window that is already being closed + 1628 7.3.546 weird line break + 1661 7.3.547 (after 7.3.541) compiler warning for uninitialized variable + 1552 7.3.548 compiler warning on 64 bit Windows + 2957 7.3.549 in 'cinoptions' "0s" is interpreted as one shiftwidth + 4392 7.3.550 (after 7.3.541) with "j" in 'fo' a list leader is not removed + 13725 7.3.551 on :tablose a TabEnter autocommand is triggered too early + 17001 7.3.552 inside comments formatting does not use the "2" flag in 'fo' + 2515 7.3.553 text displayed one cell off if 'listchars' contains "precedes" + 1660 7.3.554 compiler warning for unused argument + 7968 7.3.555 building on IBM z/OS fails + 2194 7.3.556 compiler warnings on 64 bit Windows diff --git a/spec-template.new b/spec-template.new index da55800..cea6bfc 100644 --- a/spec-template.new +++ b/spec-template.new @@ -24,8 +24,7 @@ make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT +make install DESTDIR=%{buildroot} %files diff --git a/vim.spec b/vim.spec index f322377..a151167 100644 --- a/vim.spec +++ b/vim.spec @@ -18,13 +18,13 @@ #used for pre-releases: %define beta %{nil} %define vimdir vim73%{?beta} -%define patchlevel 515 +%define patchlevel 556 Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 2%{?dist} +Release: 1%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -571,6 +571,47 @@ Patch512: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.512 Patch513: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.513 Patch514: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.514 Patch515: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.515 +Patch516: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.516 +Patch517: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.517 +Patch518: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.518 +Patch519: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.519 +Patch520: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.520 +Patch521: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.521 +Patch522: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.522 +Patch523: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.523 +Patch524: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.524 +Patch525: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.525 +Patch526: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.526 +Patch527: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.527 +Patch528: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.528 +Patch529: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.529 +Patch530: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.530 +Patch531: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.531 +Patch532: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.532 +Patch533: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.533 +Patch534: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.534 +Patch535: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.535 +Patch536: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.536 +Patch537: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.537 +Patch538: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.538 +Patch539: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.539 +Patch540: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.540 +Patch541: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.541 +Patch542: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.542 +Patch543: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.543 +Patch544: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.544 +Patch545: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.545 +Patch546: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.546 +Patch547: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.547 +Patch548: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.548 +Patch549: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.549 +Patch550: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.550 +Patch551: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.551 +Patch552: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.552 +Patch553: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.553 +Patch554: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.554 +Patch555: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.555 +Patch556: ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.556 Patch3000: vim-7.3-syntax.patch Patch3002: vim-7.1-nowarnings.patch @@ -1232,6 +1273,47 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch513 -p0 %patch514 -p0 %patch515 -p0 +%patch516 -p0 +%patch517 -p0 +%patch518 -p0 +%patch519 -p0 +%patch520 -p0 +%patch521 -p0 +%patch522 -p0 +%patch523 -p0 +%patch524 -p0 +%patch525 -p0 +%patch526 -p0 +%patch527 -p0 +%patch528 -p0 +%patch529 -p0 +%patch530 -p0 +%patch531 -p0 +%patch532 -p0 +%patch533 -p0 +%patch534 -p0 +%patch535 -p0 +%patch536 -p0 +%patch537 -p0 +%patch538 -p0 +%patch539 -p0 +%patch540 -p0 +%patch541 -p0 +%patch542 -p0 +%patch543 -p0 +%patch544 -p0 +%patch545 -p0 +%patch546 -p0 +%patch547 -p0 +%patch548 -p0 +%patch549 -p0 +%patch550 -p0 +%patch551 -p0 +%patch552 -p0 +%patch553 -p0 +%patch554 -p0 +%patch555 -p0 +%patch556 -p0 # install spell files @@ -1688,6 +1770,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/icons/hicolor/*/apps/* %changelog +* Mon Jun 18 2012 Karsten Hopp 7.3.556-1 +- patchlevel 556 + * Mon Jun 11 2012 Petr Pisar - 2:7.3.515-2 - Perl 5.16 rebuild