From abcdaae18118ac886000def0a0ba46303bec80cc Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 4 Jan 2012 14:35:37 +0100 Subject: [PATCH 01/23] updated for version 7.3.391 Problem: Can't check if the XPM_W32 feature is enabled. Solution: Add xpm_w32 to the list of features. (kat) --- src/eval.c | 3 +++ src/version.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/eval.c b/src/eval.c index 8bf243efe4..402d09d5b5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -12260,6 +12260,9 @@ f_has(argvars, rettv) #ifdef FEAT_XFONTSET "xfontset", #endif +#ifdef FEAT_XPM_W32 + "xpm_w32", +#endif #ifdef USE_XSMP "xsmp", #endif diff --git a/src/version.c b/src/version.c index 1deb08f344..d8cf62cf49 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 391, /**/ 390, /**/ From bedf368893fea47848ab36354723f0ab73e6c40a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 4 Jan 2012 14:35:37 +0100 Subject: [PATCH 02/23] Added tag v7-3-391 for changeset 819322e0e93e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 059dcacdb3..da1ed93eb4 100644 --- a/.hgtags +++ b/.hgtags @@ -1725,3 +1725,4 @@ ac16c62282ac0e961afa44b556fe850dd6c8e1aa v7-3-387 683fab13904c115b4e1f8b9ecb902d192501245d v7-3-388 c97c3272d7a67a2980ddc291f12f09c36568c54c v7-3-389 48252b5fd17042ae95c6736073ba3c5b12820f2c v7-3-390 +819322e0e93e50c04fa79163f9b88085cbe7db8d v7-3-391 From 4a32cfa105948e4127120d033768838220d31ba0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 4 Jan 2012 19:34:37 +0100 Subject: [PATCH 03/23] updated for version 7.3.392 Problem: When setting 'undofile' while the file is already loaded but unchanged, try reading the undo file. (Andy Wokula) Solution: Compute a checksum of the text when 'undofile' is set. (Christian Brabandt) --- src/option.c | 24 ++++++++++++++++++++++++ src/testdir/test72.in | 6 ++++++ src/testdir/test72.ok | 10 ++++++++++ src/version.c | 2 ++ 4 files changed, 42 insertions(+) diff --git a/src/option.c b/src/option.c index 65c53ce565..f6ed2d3706 100644 --- a/src/option.c +++ b/src/option.c @@ -7516,6 +7516,30 @@ set_bool_option(opt_idx, varp, value, opt_flags) compatible_set(); } +#ifdef FEAT_PERSISTENT_UNDO + /* 'undofile' */ + else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf) + { + char_u hash[UNDO_HASH_SIZE]; + buf_T *save_curbuf = curbuf; + + for (curbuf = firstbuf; curbuf != NULL; curbuf = curbuf->b_next) + { + /* When 'undofile' is set globally: for every buffer, otherwise + * only for the current buffer: Try to read in the undofile, if + * one exists and the buffer wasn't changed. */ + if ((curbuf == save_curbuf + || (opt_flags & OPT_GLOBAL) || opt_flags == 0) + && !curbufIsChanged()) + { + u_compute_hash(hash); + u_read_undo(NULL, hash, curbuf->b_fname); + } + } + curbuf = save_curbuf; + } +#endif + /* 'list', 'number' */ else if ((int *)varp == &curwin->w_p_list || (int *)varp == &curwin->w_p_nu diff --git a/src/testdir/test72.in b/src/testdir/test72.in index 6acb6d8f4a..220adad67a 100644 --- a/src/testdir/test72.in +++ b/src/testdir/test72.in @@ -51,6 +51,12 @@ dd:set ul=100 :e Xtestfile uuu:w >>test.out :" +:" Test that reading the undofiles when setting undofile works +:set noundofile ul=0 +i +u:e! Xtestfile +:set undofile ul=100 +uuuuuu:w >>test.out :" And now with encryption, cryptmethod=zip :e! Xtestfile :set undofile cm=zip diff --git a/src/testdir/test72.ok b/src/testdir/test72.ok index 44210c942a..bb267d0d8b 100644 --- a/src/testdir/test72.ok +++ b/src/testdir/test72.ok @@ -7,6 +7,16 @@ seven eight nine ten +one +two +three +four +five +six +seven +eight +nine +ten monday wednesday thursday diff --git a/src/version.c b/src/version.c index d8cf62cf49..fea42774b2 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 392, /**/ 391, /**/ From 43d7baf4441303a403bf52850fd96b3fde9bcf21 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 4 Jan 2012 19:34:37 +0100 Subject: [PATCH 04/23] Added tag v7-3-392 for changeset c4898d6d73a2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index da1ed93eb4..473a217647 100644 --- a/.hgtags +++ b/.hgtags @@ -1726,3 +1726,4 @@ ac16c62282ac0e961afa44b556fe850dd6c8e1aa v7-3-387 c97c3272d7a67a2980ddc291f12f09c36568c54c v7-3-389 48252b5fd17042ae95c6736073ba3c5b12820f2c v7-3-390 819322e0e93e50c04fa79163f9b88085cbe7db8d v7-3-391 +c4898d6d73a2ffa55fc91f79f8e110260eda29cb v7-3-392 From 37dcf1e83516f577d236c83bbfe99e1a81fd9c95 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 4 Jan 2012 20:29:22 +0100 Subject: [PATCH 05/23] updated for version 7.3.393 Problem: Win32: When resizing Vim it is always moved to the primary monitor if the secondary monitor is on the left. Solution: Use the nearest monitor. (Yukihiro Nakadaira) --- src/gui_w32.c | 49 ++++++++++++++++++++----------------------------- src/version.c | 2 ++ 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/src/gui_w32.c b/src/gui_w32.c index 7c6896af0b..3d8d6c7780 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -1661,9 +1661,7 @@ gui_mch_set_shellsize(int width, int height, { RECT workarea_rect; int win_width, win_height; - int win_xpos, win_ypos; WINDOWPLACEMENT wndpl; - int workarea_left; /* Try to keep window completely on screen. */ /* Get position of the screen work area. This is the part that is not @@ -1685,9 +1683,6 @@ gui_mch_set_shellsize(int width, int height, GetWindowPlacement(s_hwnd, &wndpl); } - win_xpos = wndpl.rcNormalPosition.left; - win_ypos = wndpl.rcNormalPosition.top; - /* compute the size of the outside of the window */ win_width = width + GetSystemMetrics(SM_CXFRAME) * 2; win_height = height + GetSystemMetrics(SM_CYFRAME) * 2 @@ -1697,36 +1692,32 @@ gui_mch_set_shellsize(int width, int height, #endif ; - /* There is an inconsistency when using two monitors and Vim is on the - * second (right) one: win_xpos will be the offset from the workarea of - * the left monitor. While with one monitor it's the offset from the - * workarea (including a possible taskbar on the left). Detect the second - * monitor by checking for the left offset to be quite big. */ - if (workarea_rect.left > 300) - workarea_left = 0; - else - workarea_left = workarea_rect.left; + /* The following should take care of keeping Vim on the same monitor, no + * matter if the secondary monitor is left or right of the primary + * monitor. */ + wndpl.rcNormalPosition.right = wndpl.rcNormalPosition.left + win_width; + wndpl.rcNormalPosition.bottom = wndpl.rcNormalPosition.top + win_height; - /* If the window is going off the screen, move it on to the screen. - * win_xpos and win_ypos are relative to the workarea. */ + /* If the window is going off the screen, move it on to the screen. */ if ((direction & RESIZE_HOR) - && workarea_left + win_xpos + win_width > workarea_rect.right) - win_xpos = workarea_rect.right - win_width - workarea_left; + && wndpl.rcNormalPosition.right > workarea_rect.right) + OffsetRect(&wndpl.rcNormalPosition, + workarea_rect.right - wndpl.rcNormalPosition.right, 0); - if ((direction & RESIZE_HOR) && win_xpos < 0) - win_xpos = 0; + if ((direction & RESIZE_HOR) + && wndpl.rcNormalPosition.left < workarea_rect.left) + OffsetRect(&wndpl.rcNormalPosition, + workarea_rect.left - wndpl.rcNormalPosition.left, 0); if ((direction & RESIZE_VERT) - && workarea_rect.top + win_ypos + win_height > workarea_rect.bottom) - win_ypos = workarea_rect.bottom - win_height - workarea_rect.top; + && wndpl.rcNormalPosition.bottom > workarea_rect.bottom) + OffsetRect(&wndpl.rcNormalPosition, + 0, workarea_rect.bottom - wndpl.rcNormalPosition.bottom); - if ((direction & RESIZE_VERT) && win_ypos < 0) - win_ypos = 0; - - wndpl.rcNormalPosition.left = win_xpos; - wndpl.rcNormalPosition.right = win_xpos + win_width; - wndpl.rcNormalPosition.top = win_ypos; - wndpl.rcNormalPosition.bottom = win_ypos + win_height; + if ((direction & RESIZE_VERT) + && wndpl.rcNormalPosition.top < workarea_rect.top) + OffsetRect(&wndpl.rcNormalPosition, + 0, workarea_rect.top - wndpl.rcNormalPosition.top); /* set window position - we should use SetWindowPlacement rather than * SetWindowPos as the MSDN docs say the coord systems returned by diff --git a/src/version.c b/src/version.c index fea42774b2..42ef75c1d6 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 393, /**/ 392, /**/ From 7d04ad08e12ab98d751bb818c7cb9bb0830c586a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 4 Jan 2012 20:29:22 +0100 Subject: [PATCH 06/23] Added tag v7-3-393 for changeset e0248b732a5c --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 473a217647..cf6930ce47 100644 --- a/.hgtags +++ b/.hgtags @@ -1727,3 +1727,4 @@ c97c3272d7a67a2980ddc291f12f09c36568c54c v7-3-389 48252b5fd17042ae95c6736073ba3c5b12820f2c v7-3-390 819322e0e93e50c04fa79163f9b88085cbe7db8d v7-3-391 c4898d6d73a2ffa55fc91f79f8e110260eda29cb v7-3-392 +e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 From 9c564ae9a5b4f7fe918293fa50b832d1a68fea25 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 12:42:09 +0100 Subject: [PATCH 07/23] updated for version 7.3.394 Problem: When placing a mark while starting up a screen redraw messes up the screen. (lith) Solution: Don't redraw while still starting up. (Christian Brabandt) --- src/screen.c | 10 +++++++--- src/version.c | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/screen.c b/src/screen.c index 2c87e9b9ef..ad2d345f07 100644 --- a/src/screen.c +++ b/src/screen.c @@ -764,9 +764,13 @@ update_debug_sign(buf, lnum) doit = TRUE; } - /* Return when there is nothing to do or screen updating already - * happening. */ - if (!doit || updating_screen) + /* Return when there is nothing to do, screen updating is already + * happening (recursive call) or still starting up. */ + if (!doit || updating_screen +#ifdef FEAT_GUI + || gui.starting +#endif + || starting) return; /* update all windows that need updating */ diff --git a/src/version.c b/src/version.c index 42ef75c1d6..b7fa49ceb1 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 394, /**/ 393, /**/ From 7ceb27ce7c0d2b0088c6bc1be570d3d7e9c870a5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 12:42:10 +0100 Subject: [PATCH 08/23] Added tag v7-3-394 for changeset 927c7377cf49 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cf6930ce47..1b9ba2c382 100644 --- a/.hgtags +++ b/.hgtags @@ -1728,3 +1728,4 @@ c97c3272d7a67a2980ddc291f12f09c36568c54c v7-3-389 819322e0e93e50c04fa79163f9b88085cbe7db8d v7-3-391 c4898d6d73a2ffa55fc91f79f8e110260eda29cb v7-3-392 e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 +927c7377cf49bbbf87d12863c2a2d462c9cf97a7 v7-3-394 From 00266fe604c8700e6a12b0adf3d23d42e1ab937b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 13:44:27 +0100 Subject: [PATCH 09/23] updated for version 7.3.395 Problem: "dv?bar" in the last line deletes too much and breaks undo. Solution: Only adjust the cursor position when it's after the last line of the buffer. Add a test. (Christian Brabandt) --- src/ops.c | 6 +++--- src/testdir/test43.in | 8 +++++++- src/testdir/test43.ok | 3 +++ src/version.c | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/ops.c b/src/ops.c index 656285a50f..f8341a81ab 100644 --- a/src/ops.c +++ b/src/ops.c @@ -1961,8 +1961,8 @@ op_delete(oap) /* Special case: gH deletes the last line. */ del_lines(1L, FALSE); curwin->w_cursor = curpos; /* restore curwin->w_cursor */ - if (curwin->w_cursor.lnum > 1) - --curwin->w_cursor.lnum; + if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) + curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; } else { @@ -4434,7 +4434,7 @@ same_leader(lnum, leader1_len, leader1_flags, leader2_len, leader2_flags) #endif /* - * implementation of the format operator 'gq' + * Implementation of the format operator 'gq'. */ void op_format(oap, keep_cursor) diff --git a/src/testdir/test43.in b/src/testdir/test43.in index 26f0e0c9a9..49a97d939d 100644 --- a/src/testdir/test43.in +++ b/src/testdir/test43.in @@ -13,7 +13,11 @@ x/\V^aa$ x:set magic /\v(a)(b)\2\1\1/e x/\V[ab]\(\[xy]\)\1 -x:?^1?,$w! test.out +x:$ +:set undolevels=100 +dv?bar? +Yup:" +:?^1?,$w! test.out :qa! ENDTEST @@ -25,3 +29,5 @@ ENDTEST 6 x ^aa$ x 7 (a)(b) abbaa 8 axx [ab]xx +9 foobar + diff --git a/src/testdir/test43.ok b/src/testdir/test43.ok index 425316b68d..0b37a6a61e 100644 --- a/src/testdir/test43.ok +++ b/src/testdir/test43.ok @@ -6,3 +6,6 @@ 6 x aa$ x 7 (a)(b) abba 8 axx ab]xx +9 foobar +9 foo + diff --git a/src/version.c b/src/version.c index b7fa49ceb1..c33a6f38df 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 395, /**/ 394, /**/ From e57757c7d8d34352477d98023eca9c3fa9fc4522 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 13:44:28 +0100 Subject: [PATCH 10/23] Added tag v7-3-395 for changeset 80c529a5650f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1b9ba2c382..5ae9d80997 100644 --- a/.hgtags +++ b/.hgtags @@ -1729,3 +1729,4 @@ c97c3272d7a67a2980ddc291f12f09c36568c54c v7-3-389 c4898d6d73a2ffa55fc91f79f8e110260eda29cb v7-3-392 e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 927c7377cf49bbbf87d12863c2a2d462c9cf97a7 v7-3-394 +80c529a5650f1d70342f18c681b69d7897495006 v7-3-395 From abaa7dd69a86bfd9e14419b95aaa118c0c8133ad Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 13:46:22 +0100 Subject: [PATCH 11/23] updated for version 7.3.396 Problem: After forcing an operator to be characterwise it can still become linewise when spanning whole lines. Solution: Don't make the operator linewise when motion_force was set. (Christian Brabandt) --- src/ops.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ops.c b/src/ops.c index f8341a81ab..971e3244dd 100644 --- a/src/ops.c +++ b/src/ops.c @@ -1648,6 +1648,7 @@ op_delete(oap) && !oap->block_mode #endif && oap->line_count > 1 + && oap->motion_force == NUL && oap->op_type == OP_DELETE) { ptr = ml_get(oap->end.lnum) + oap->end.col; diff --git a/src/version.c b/src/version.c index c33a6f38df..e0d926def2 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 396, /**/ 395, /**/ From f7046c5053a0137ee2bb448a609e7bce0fe9ae04 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 13:46:22 +0100 Subject: [PATCH 12/23] Added tag v7-3-396 for changeset 2f075595590f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 5ae9d80997..c16e0aacc3 100644 --- a/.hgtags +++ b/.hgtags @@ -1730,3 +1730,4 @@ c4898d6d73a2ffa55fc91f79f8e110260eda29cb v7-3-392 e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 927c7377cf49bbbf87d12863c2a2d462c9cf97a7 v7-3-394 80c529a5650f1d70342f18c681b69d7897495006 v7-3-395 +2f075595590f498f1a9cfc42dfce24cd0d980e96 v7-3-396 From 9fef527133976d0c3ce1519af824396313e8ede3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 14:55:01 +0100 Subject: [PATCH 13/23] Updated runtime files. --- runtime/autoload/spellfile.vim | 7 ++-- runtime/doc/change.txt | 5 +-- runtime/doc/eval.txt | 5 +-- runtime/doc/sign.txt | 6 ++-- runtime/doc/syntax.txt | 15 ++++---- runtime/doc/todo.txt | 60 ++++++++++++++------------------ runtime/doc/various.txt | 23 +++++++------ runtime/filetype.vim | 5 ++- runtime/ftplugin/lisp.vim | 4 +-- runtime/ftplugin/scheme.vim | 25 ++++++++++++-- runtime/indent/lisp.vim | 4 +-- runtime/syntax/asm.vim | 44 +++++++++++++++++++----- runtime/syntax/c.vim | 13 +++++-- runtime/syntax/eiffel.vim | 7 +++- runtime/syntax/forth.vim | 23 +++++++++---- runtime/syntax/fortran.vim | 32 +++++++++++++---- runtime/syntax/gsp.vim | 8 ++++- runtime/syntax/hb.vim | 7 +++- runtime/syntax/help.vim | 7 +++- runtime/syntax/ist.vim | 7 +++- runtime/syntax/jam.vim | 7 +++- runtime/syntax/ninja.vim | 63 ++++++++++++++++++++++++++++++++++ runtime/tutor/tutor.de | 2 +- runtime/tutor/tutor.de.utf-8 | 2 +- 24 files changed, 278 insertions(+), 103 deletions(-) create mode 100644 runtime/syntax/ninja.vim diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim index 534acc615a..e7fd1d8b17 100644 --- a/runtime/autoload/spellfile.vim +++ b/runtime/autoload/spellfile.vim @@ -1,6 +1,6 @@ " Vim script to download a missing spell file " Maintainer: Bram Moolenaar -" Last Change: 2008 Nov 29 +" Last Change: 2012 Jan 08 if !exists('g:spellfile_URL') " Prefer using http:// when netrw should be able to use it, since @@ -70,7 +70,7 @@ function! spellfile#LoadFile(lang) " Remember the buffer number, we check it below. new let newbufnr = winbufnr(0) - setlocal bin + setlocal bin fenc= echo 'Downloading ' . fname . '...' call spellfile#Nread(fname) if getline(2) !~ 'VIMspell' @@ -83,7 +83,7 @@ function! spellfile#LoadFile(lang) " Our buffer has vanished!? Open a new window. echomsg "download buffer disappeared, opening a new one" new - setlocal bin + setlocal bin fenc= else exe winnr . "wincmd w" endif @@ -120,6 +120,7 @@ function! spellfile#LoadFile(lang) else let dirname = escape(dirlist[dirchoice], ' ') endif + setlocal fenc= exe "write " . dirname . '/' . fname " Also download the .sug file, if the user wants to. diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index d40d3509e7..063b7a5ae9 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.3. Last change: 2011 Oct 28 +*change.txt* For Vim version 7.3. Last change: 2012 Jan 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -88,7 +88,8 @@ An exception for the d{motion} command: If the motion is not linewise, the start and end of the motion are not in the same line, and there are only blanks before the start and after the end of the motion, the delete becomes linewise. This means that the delete also removes the line of blanks that you -might expect to remain. +might expect to remain. Use the |o_v| operator to force the motion to be +characterwise. Trying to delete an empty region of text (e.g., "d0" in the first column) is an error when 'cpoptions' includes the 'E' flag. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 514a6704a9..abf9c908eb 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2011 Dec 19 +*eval.txt* For Vim version 7.3. Last change: 2012 Jan 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -6157,7 +6157,7 @@ xor({expr}, {expr}) *xor()* to a number. A List, Dict or Float argument causes an error. Example: > :let bits = xor(bits, 0x80) - +< *feature-list* @@ -6340,6 +6340,7 @@ windows Compiled with support for more than one window. writebackup Compiled with 'writebackup' default on. xfontset Compiled with X fontset support |xfontset|. xim Compiled with X input method support |xim|. +xpm_w32 Compiled with pixmap support for Win32. xsmp Compiled with X session management support. xsmp_interact Compiled with interactive X session management support. xterm_clipboard Compiled with support for xterm clipboard. diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 5784c9fb7b..9771fbdc73 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -1,4 +1,4 @@ -*sign.txt* For Vim version 7.3. Last change: 2010 Oct 14 +*sign.txt* For Vim version 7.3. Last change: 2012 Jan 04 VIM REFERENCE MANUAL by Gordon Prieur @@ -76,7 +76,7 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612* Accepted arguments: - icon={pixmap} + icon={bitmap} Define the file name where the bitmap can be found. Should be a full path. The bitmap should fit in the place of two characters. This is not checked. If the bitmap is too big it @@ -86,6 +86,8 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612* GTK 1 pixmap (.xpm) GTK 2 many Motif pixmap (.xpm) + Win32 .bmp, .ico, .cur + pixmap (.xpm) |+xpm_w32| linehl={group} Highlighting group used for the whole line the sign is placed diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index ce65aab577..772390463d 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.3. Last change: 2011 Dec 30 +*syntax.txt* For Vim version 7.3. Last change: 2012 Jan 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -758,6 +758,7 @@ c_syntax_for_h use C syntax for *.h files, instead of C++ c_no_if0 don't highlight "#if 0" blocks as comments c_no_cformat don't highlight %-formats in strings c_no_c99 don't highlight C99 standard items +c_no_c11 don't highlight C11 standard items When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will become a fold. If you don't want comments to become a fold use: > @@ -1155,11 +1156,9 @@ conditionals are LightBlue for better distinction. FORTRAN *fortran.vim* *ft-fortran-syntax* Default highlighting and dialect ~ -Highlighting appropriate for f95 (Fortran 95) is used by default. This choice -should be appropriate for most users most of the time because Fortran 95 is a -superset of Fortran 90 and almost a superset of Fortran 77. Support for -Fortran 2003 and Fortran 2008 features has been introduced and is -automatically available in the default (f95) highlighting. +Highlighting appropriate for Fortran 2008 is used by default. This choice +should be appropriate for most users most of the time because Fortran 2008 is +almost a superset of previous versions (Fortran 2003, 95, 90, and 77). Fortran source code form ~ Fortran 9x code can be in either fixed or free source form. Note that the @@ -1244,7 +1243,9 @@ construct. Non-default fortran dialects ~ The syntax script supports five Fortran dialects: f95, f90, f77, the Lahey -subset elf90, and the Imagine1 subset F. +subset elf90, and the Imagine1 subset F. However, these dialects are outdated; +the next version of the syntax script will support only two variants: modern +Fortran and legacy Fortran. If you use f77 with extensions, even common ones like do/enddo loops, do/while loops and free source form that are supported by most f77 compilers including diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index c044ce1bde..49e245f23a 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2011 Dec 30 +*todo.txt* For Vim version 7.3. Last change: 2012 Jan 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,37 +38,32 @@ Go through more coverity reports. Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) -Patch to fix crash with EXITFREE. (Dominique Pelle, 2011 Dec 20) - -Patch to fix "Console prompts fail to reset the console pager". -Issue 14 on googlecode - -Issue 33 on googlecode: feedkeys() leaks memory. - -Patch for Mac using NULL pointer. (Bjorn Winckler, 2011 Dec 18) - -Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1) -Needs more work. - -Issue 43: patch with new C keywords. - -When setting 'undofile' while the file is already loaded, but unchanged, try -to read the undo file. Requires computing a checksum of the text. (Andy -Wokula) -Patch from Christian Brabandt, 2011 Dec 22. Dec 24 with test. - -Patch for Vim moving to another window when resizing. (Yukihiro Nakadaira, -2011 Dec 18) - Compilation problem on z/OS, POUND is equal to '#', duplicate case. (Stephen Bovy, 2011 Dec 16) Once syntax and other runtime files have been fixed: add "set cp" to check.vim. Use a function to run both with 'cp' and 'nocp'. +Patch to fix regression caused by 7.3.251. (Christian Brabandt, 2012 Jan 5) + Patch to make ":helpgrep" work with non-UTF-8 encoding. (Yasuhiro Matsumoto, 2011 Nov 28, update later that day) +Patch to fix messing up terminal when redrawing too early. (Christian +Brabandt, 2012 Jan 5) + +Patch to fix member confusion in Lua interface. (Taro Muraoka, 2012 Jan 8) +Update Jan 9. +Carvalho will merge the patch. + +Possible quickfix bug: Audrius Kažukauskas, 2012 Jan 6 + +Problem reading german spell file? (Jan Stocker, 2012 Jan 5) + +Win32: When a directory name contains an exclamation mark, completion doesn't +complete the contents of the directory. No escaping for the "!"? (Jan +Stocker, 2012 Jan 5) + ":doau" says it triggers modeline. Should this only happen for events used when loading a buffer? (Kana Natsuno, 2011 Nov 7) @@ -163,6 +158,9 @@ Only for MS-Windows. No documentation. Do we want this? Patch to support cursor shape in Cygwin console. (Ben bgold, 2011 Dec 27) +Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1) +Needs more work. Pinged 2012 Jan 4. + 'cursorline' is displayed too short when there are concealed characters and 'list' is set. (Dennis Preiser) Patch 7.3.116 was the wrong solution. @@ -409,6 +407,10 @@ mkdir(). 'cindent' not correct when 'list' is set. (Zdravi Korusef, 2010 Apr 15) +C-indenting: A matching { in a comment is ignored, but intermediate { are not +checked to be in a comment. Implement FM_SKIPCOMM flag of findmatchlimit(). +Issue 46. + When 'paste' is changed with 'pastetoggle', the ruler doesn't reflect this right away. (Samuel Ferencik, 2010 Dec 7) @@ -1746,18 +1748,6 @@ Win32 GUI known bugs: the wide functions. 8 On Windows 98 the unicows library is needed to support functions with UCS2 file names. Can we load unicows.dll dynamically? -8 Win32: With two monitors, gvim partly on both, and adding/removing a - scrollbar Vim resizes and moves to one of the monitors. (Chris Monkiewicz, - 2008 Oct) -8 When the primary monitor is below or right of the secondary monitor and - Vim is on the secondary monitor it will often move to the primary monitor. - Window position coordinates can be negative. (James Harvey) - When the primary monitor is on the right, coordinates on the left monitor - are negative. Clamping to zero means gvim jups to the primary monitor. - (Michael Wookey, 2010 Aug 17) - Probably the same issue: When the GUI tab pages line is displayed Vim - jumps from the secondary to the primary monitor. (Afton Lewis, 2007 Mar 9) - Possible solution using GetSystemMetrics() (Sergey Khorev, 2010 Aug 18) 8 The -P argument doesn't work very well with many MDI applications. The last argument of CreateWindowEx() should be used, see MSDN docs. Tutorial: http://win32assembly.online.fr/tut32.html diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 78ab7a63be..ebb10fb3b2 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.3. Last change: 2011 Dec 29 +*various.txt* For Vim version 7.3. Last change: 2012 Jan 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -391,35 +391,36 @@ N *+statusline* Options 'statusline', 'rulerformat' and special m *+sun_workshop* |workshop| N *+syntax* Syntax highlighting |syntax| *+system()* Unix only: opposite of |+fork| -N *+tag_binary* binary searching in tags file |tag-binary-search| +N *+tag_binary* binary searching in tags file |tag-binary-search| N *+tag_old_static* old method for static tags |tag-old-static| m *+tag_any_white* any white space allowed in tags file |tag-any-white| -m *+tcl* Tcl interface |tcl| +m *+tcl* Tcl interface |tcl| m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn| *+terminfo* uses |terminfo| instead of termcap N *+termresponse* support for |t_RV| and |v:termresponse| -N *+textobjects* |text-objects| selection +N *+textobjects* |text-objects| selection *+tgetent* non-Unix only: able to use external termcap N *+title* Setting the window 'title' and 'icon' N *+toolbar* |gui-toolbar| N *+user_commands* User-defined commands. |user-commands| N *+viminfo* |'viminfo'| N *+vertsplit* Vertically split windows |:vsplit| -N *+virtualedit* |'virtualedit'| +N *+virtualedit* |'virtualedit'| S *+visual* Visual mode |Visual-mode| -N *+visualextra* extra Visual mode commands |blockwise-operators| +N *+visualextra* extra Visual mode commands |blockwise-operators| N *+vreplace* |gR| and |gr| -N *+wildignore* |'wildignore'| +N *+wildignore* |'wildignore'| N *+wildmenu* |'wildmenu'| S *+windows* more than one window -m *+writebackup* |'writebackup'| is default on -m *+xim* X input method |xim| +m *+writebackup* |'writebackup'| is default on +m *+xim* X input method |xim| *+xfontset* X fontset support |xfontset| +m *+xpm_w32* Win32 GUI only: pixmap support |:sign-define| *+xsmp* XSMP (X session management) support *+xsmp_interact* interactive XSMP (X session management) support N *+xterm_clipboard* Unix only: xterm clipboard handling -m *+xterm_save* save and restore xterm screen |xterm-screens| -N *+X11* Unix only: can restore window title |X11| +m *+xterm_save* save and restore xterm screen |xterm-screens| +N *+X11* Unix only: can restore window title |X11| */dyn* *E370* *E448* To some of the features "/dyn" is added when the diff --git a/runtime/filetype.vim b/runtime/filetype.vim index f6dce94adf..17cd03424f 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2011 Dec 28 +" Last Change: 2012 Jan 04 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1217,6 +1217,9 @@ au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural " Netrc au BufNewFile,BufRead .netrc setf netrc +" Ninja file +au BufNewFile,BufRead *.ninja setf ninja + " Novell netware batch files au BufNewFile,BufRead *.ncf setf ncf diff --git a/runtime/ftplugin/lisp.vim b/runtime/ftplugin/lisp.vim index b477214027..589a600b56 100644 --- a/runtime/ftplugin/lisp.vim +++ b/runtime/ftplugin/lisp.vim @@ -1,10 +1,10 @@ " Vim filetype plugin " Language: Lisp " Maintainer: Sergey Khorev -" URL: http://iamphet.nm.ru/vim +" URL: http://sites.google.com/site/khorser/opensource/vim " Original author: Dorai Sitaram " Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html -" Last Change: Nov 8, 2004 +" Last Change: Jan 9, 2012 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") diff --git a/runtime/ftplugin/scheme.vim b/runtime/ftplugin/scheme.vim index f4cee0c2a0..44c776af91 100644 --- a/runtime/ftplugin/scheme.vim +++ b/runtime/ftplugin/scheme.vim @@ -1,13 +1,32 @@ " Vim filetype plugin " Language: Scheme " Maintainer: Sergey Khorev -" URL: http://iamphet.nm.ru/vim +" URL: http://sites.google.com/site/khorser/opensource/vim " Original author: Dorai Sitaram " Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html -" Last Change: Nov 22, 2004 +" Last Change: Jan 9, 2012 -runtime! ftplugin/lisp.vim ftplugin/lisp_*.vim ftplugin/lisp/*.vim +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Copy-paste from ftplugin/lisp.vim +setl comments=:; +setl define=^\\s*(def\\k* +setl formatoptions-=t +setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 +setl lisp + +" make comments behaviour like in c.vim +" e.g. insertion of ;;; and ;; on normal "O" or "o" when staying in comment +setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# +setl formatoptions+=croql + +" Scheme-specific settings if exists("b:is_mzscheme") || exists("is_mzscheme") " improve indenting setl iskeyword+=#,%,^ diff --git a/runtime/indent/lisp.vim b/runtime/indent/lisp.vim index 9f404ae6cc..b0c4eed1bd 100644 --- a/runtime/indent/lisp.vim +++ b/runtime/indent/lisp.vim @@ -1,8 +1,8 @@ " Vim indent file " Language: Lisp " Maintainer: Sergey Khorev -" URL: http://iamphet.nm.ru/vim -" Last Change: 2005 May 19 +" URL: http://sites.google.com/site/khorser/opensource/vim +" Last Change: 2012 Jan 10 " Only load this indent file when no other was loaded. if exists("b:did_indent") diff --git a/runtime/syntax/asm.vim b/runtime/syntax/asm.vim index 6b8ce1ed5b..0ce8d23994 100644 --- a/runtime/syntax/asm.vim +++ b/runtime/syntax/asm.vim @@ -3,7 +3,7 @@ " Maintainer: Erik Wognsen " Previous maintainer: " Kevin Dahlhausen -" Last Change: 2010 Apr 18 +" Last Change: 2012 Jan 5 " Thanks to Ori Avtalion for feedback on the comment markers! @@ -15,6 +15,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case ignore " storage types @@ -40,7 +43,7 @@ syn match asmIdentifier "[a-z_][a-z0-9_]*" " Various #'s as defined by GAS ref manual sec 3.6.2.1 " Technically, the first decNumber def is actually octal, " since the value of 0-7 octal is the same as 0-7 decimal, -" I prefer to map it as decimal: +" I (Kevin) prefer to map it as decimal: syn match decNumber "0\+[1-7]\=[\t\n$,; ]" syn match decNumber "[1-9]\d*" syn match octNumber "0[0-7][0-7]\+" @@ -49,14 +52,34 @@ syn match binNumber "0[bB][0-1]*" syn keyword asmTodo contained TODO -" GAS supports various comment markers as described here: -" http://sourceware.org/binutils/docs-2.19/as/Comments.html -" I have commented out the ARM comment marker "@" by default as I think more -" people are using "@" with the .type directive. See -" http://sourceware.org/binutils/docs-2.19/as/Type.html + +" GAS supports one type of multi line comments: syn region asmComment start="/\*" end="\*/" contains=asmTodo + +" Line comment characters depend on the target architecture and command line +" options and some comments may double as logical line number directives or +" preprocessor commands. This situation is described at +" http://sourceware.org/binutils/docs-2.22/as/Comments.html +" Some line comment characters have other meanings for other targets. For +" example, .type directives may use the `@' character which is also an ARM +" comment marker. +" As a compromise to accommodate what I arbitrarily assume to be the most +" frequently used features of the most popular architectures (and also the +" non-GNU assembly languages that use this syntax file because their asm files +" are also named *.asm), the following are used as line comment characters: syn match asmComment "[#;!|].*" contains=asmTodo -" syn match asmComment "@.*" contains=asmTodo + +" Side effects of this include: +" - When `;' is used to separate statements on the same line (many targets +" support this), all statements except the first get highlighted as +" comments. As a remedy, remove `;' from the above. +" - ARM comments are not highlighted correctly. For ARM, uncomment the +" following two lines and comment the one above. +"syn match asmComment "@.*" contains=asmTodo +"syn match asmComment "^#.*" contains=asmTodo + +" Advanced users of specific architectures will probably want to change the +" comment highlighting or use a specific, more comprehensive syntax file. syn match asmInclude "\.include" syn match asmCond "\.if" @@ -97,7 +120,7 @@ if version >= 508 || !exists("did_asm_syntax_inits") HiLink octNumber Number HiLink binNumber Number - HiLink asmIdentifier Identifier + HiLink asmIdentifier Identifier HiLink asmType Type delcommand HiLink @@ -105,4 +128,7 @@ endif let b:current_syntax = "asm" +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index aef59a607f..7af0067f8a 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2011 Dec 30 +" Last Change: 2012 Jan 04 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -181,7 +181,7 @@ if !exists("c_no_ansi") || exists("c_ansi_typedefs") syn keyword cType mbstate_t wctrans_t wint_t wctype_t endif if !exists("c_no_c99") " ISO C99 - syn keyword cType bool complex + syn keyword cType _Bool bool _Complex complex _Imaginary imaginary syn keyword cType int8_t int16_t int32_t int64_t syn keyword cType uint8_t uint16_t uint32_t uint64_t syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t @@ -203,6 +203,15 @@ endif if !exists("c_no_c99") syn keyword cStorageClass inline restrict endif +if !exists("c_no_c11") + syn keyword cStorageClass _Alignas alignas + syn keyword cOperator _Alignof alignof + syn keyword cStorageClass _Atomic + syn keyword cOperator _Generic + syn keyword cStorageClass _Noreturn noreturn + syn keyword cOperator _Static_assert static_assert + syn keyword cStorageClass _Thread_local thread_local +endif if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") if exists("c_gnu") diff --git a/runtime/syntax/eiffel.vim b/runtime/syntax/eiffel.vim index af6eee98a3..e5bc69ada7 100644 --- a/runtime/syntax/eiffel.vim +++ b/runtime/syntax/eiffel.vim @@ -3,7 +3,7 @@ " Maintainer: Reimer Behrends " With much input from Jocelyn Fiat " See http://www.cse.msu.edu/~behrends/vim/ for the most current version. -" Last Change: 2001 May 09 +" Last Change: 2011 Dec 31 by Thilo Six " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -13,6 +13,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Option handling if exists("eiffel_ignore_case") @@ -193,4 +196,6 @@ endif let b:current_syntax = "eiffel" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/forth.vim b/runtime/syntax/forth.vim index bbdced2efd..b42c5dcd65 100644 --- a/runtime/syntax/forth.vim +++ b/runtime/syntax/forth.vim @@ -1,11 +1,11 @@ " Vim syntax file " Language: FORTH " Maintainer: Christian V. J. Brüssow -" Last Change: Di 07 Jul 2009 21:38:45 CEST +" Last Change: Sa 07 Jan 2012 21:30:55 CET " Filenames: *.fs,*.ft " URL: http://www.cvjb.de/comp/vim/forth.vim -" $Id: forth.vim,v 1.12 2008/07/07 21:39:12 bruessow Exp $ +" $Id: forth.vim,v 1.13 2012/01/07 21:31:31 bruessow Exp $ " The list of keywords is incomplete, compared with the offical ANS " wordlist. If you use this language, please improve it, and send me @@ -16,6 +16,10 @@ " for forth.vim). " Many Thanks to... +" +" 2012-01-07: +" Thilo Six send a patch for cpoptions. +" See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151 " " 2009-06-28: " Josh Grams send a patch to allow the parenthesis comments at the @@ -47,7 +51,7 @@ " Thomas E. Vaughan send me a patch " for the parenthesis comment word, so words with a trailing " parenthesis will not start the highlighting for such comments. -" +" " 2003-05-10: " Andrew Gaul send me a patch for " forthOperators. @@ -80,6 +84,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Synchronization method syn sync ccomment syn sync maxlines=200 @@ -125,7 +132,7 @@ syn keyword forthOperators F~REL F~ABS F~ syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= U< U<= syn keyword forthOperators U> U>= D0< D0<= D0<> D0= D0> D0>= D< D<= D<> syn keyword forthOperators D= D> D>= DU< DU<= DU> DU>= WITHIN ?NEGATE -syn keyword forthOperators ?DNEGATE +syn keyword forthOperators ?DNEGATE " stack manipulations syn keyword forthStack DROP NIP DUP OVER TUCK SWAP ROT -ROT ?DUP PICK ROLL @@ -171,7 +178,7 @@ syn keyword forthDefine LITERAL CREATE-INTERPRET/COMPILE INTERPRETATION> syn keyword forthDefine INT NAME?INT NAME>COMP syn keyword forthDefine NAME>STRING STATE C; CVARIABLE -syn keyword forthDefine , 2, F, C, +syn keyword forthDefine , 2, F, C, syn match forthDefine "\[IFDEF]" syn match forthDefine "\[IFUNDEF]" syn match forthDefine "\[THEN]" @@ -210,7 +217,7 @@ syn match forthCharOps '\<\[char\]\s\S\s' syn region forthCharOps start=+."\s+ skip=+\\"+ end=+"+ " char-number conversion -syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F +syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F syn keyword forthConversion D>S DIGIT DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER syn keyword forthConversion F>S S>F @@ -225,7 +232,7 @@ syn keyword forthVocs ONLY FORTH ALSO ROOT SEAL VOCS ORDER CONTEXT #VOCS syn keyword forthVocs VOCABULARY DEFINITIONS " File keywords -syn keyword forthFileMode R/O R/W W/O BIN +syn keyword forthFileMode R/O R/W W/O BIN syn keyword forthFileWords OPEN-FILE CREATE-FILE CLOSE-FILE DELETE-FILE syn keyword forthFileWords RENAME-FILE READ-FILE READ-LINE KEY-FILE syn keyword forthFileWords KEY?-FILE WRITE-FILE WRITE-LINE EMIT-FILE @@ -331,4 +338,6 @@ endif let b:current_syntax = "forth" +let &cpo = s:cpo_save +unlet s:cpo_save " vim:ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim index e1d82ac0aa..3e5cb220b6 100644 --- a/runtime/syntax/fortran.vim +++ b/runtime/syntax/fortran.vim @@ -1,7 +1,7 @@ " Vim syntax file -" Language: Fortran95 (and Fortran90, Fortran77, F and elf90) -" Version: 0.90 -" Last Change: 2011 Dec. 28 +" Language: Fortran 2008 (and earlier versions including 2003, 95, 90, and 77) +" Version: 0.91 +" Last Change: 2012 Jan. 02 " Maintainer: Ajit J. Thakkar (ajit AT unb.ca); " Usage: For instructions, do :help fortran-syntax from Vim " Credits: @@ -133,6 +133,7 @@ syn match fortranUnitHeader "\" syn keyword fortranKeyword return stop syn keyword fortranConditional else then syn match fortranConditional "\" +syn match fortranConditionalOb "\" syn keyword fortranTodo contained todo fixme @@ -144,6 +145,7 @@ syn match fortranParenError ")" syn match fortranOperator "\.\s*n\=eqv\s*\." syn match fortranOperator "\.\s*\(and\|or\|not\)\s*\." syn match fortranOperator "\(+\|-\|/\|\*\)" +syn match fortranTypeOb "\\@<=\s*\*" syn match fortranBoolean "\.\s*\(true\|false\)\s*\." @@ -161,7 +163,7 @@ syn keyword fortranIO access blank direct exist file fmt form formatted iostat syn keyword fortran66Intrinsic alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl " Intrinsics provided by some vendors -syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama erf erfc gamma iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh +syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh syn keyword fortran77Intrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh syn match fortran77Intrinsic "\" syn match fortranKeyword "^\s*\d\+\s\+continue\>" -syn match fortranKeywordEx "\" +syn match fortranKeyword "\" +syn match fortranKeywordDel "\= 508 || !exists("did_fortran_syn_inits") HiLink fortran08Intrinsic Function HiLink fortran03Constant Function + if b:fortran_dialect != "f77" + HiLink fortranUnitHeaderOb Todo + HiLink fortranKeywordOb Todo + HiLink fortranConditionalOb Todo + HiLink fortranTypeOb Todo + HiLink fortranKeywordDel Todo + else + HiLink fortranUnitHeaderOb fortranUnitHeader + HiLink fortranKeywordOb fortranKeyword + HiLink fortranConditionalOb fortranConditional + HiLink fortranTypeOb fortranType + HiLink fortranKeywordDel fortranKeyword + endif + if ( b:fortran_dialect == "elf" || b:fortran_dialect == "F" ) HiLink fortranKeywordOb fortranObsolete HiLink fortran66Intrinsic fortranObsolete diff --git a/runtime/syntax/gsp.vim b/runtime/syntax/gsp.vim index e7766c5b57..e7b1b1632f 100644 --- a/runtime/syntax/gsp.vim +++ b/runtime/syntax/gsp.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: GSP - GNU Server Pages (v. 0.86) " Created By: Nathaniel Harward nharward@yahoo.com -" Last Changed: Dec. 12, 2000 +" Last Changed: 2012 Jan 08 by Thilo Six " Filenames: *.gsp " URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim @@ -34,6 +34,9 @@ else syn include @gspJava syntax/java.vim endif +let s:cpo_save = &cpo +set cpo&vim + " Add as an HTML tag name along with its args syn keyword htmlTagName contained java syn keyword htmlArg contained type file page @@ -57,3 +60,6 @@ let b:current_syntax = "gsp" if main_syntax == 'gsp' unlet main_syntax endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/hb.vim b/runtime/syntax/hb.vim index 6df30543b2..d4de3ff1e1 100644 --- a/runtime/syntax/hb.vim +++ b/runtime/syntax/hb.vim @@ -2,7 +2,7 @@ " Language: Hyper Builder " Maintainer: Alejandro Forero Cuervo " URL: http://bachue.com/hb/vim/syntax/hb.vim -" Last Change: 2001 Sep 02 +" Last Change: 2012 Jan 08 by Thilo Six " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -12,6 +12,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Read the HTML syntax to start with "syn include @HTMLStuff :p:h/htmlhb.vim @@ -94,4 +97,6 @@ syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$" let b:current_syntax = "hb" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index d3002a5733..6bd8dd09b2 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -1,13 +1,16 @@ " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) -" Last Change: 2011 Dec 03 +" Last Change: 2012 Jan 08 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1 syn match helpSectionDelim "^=\{3,}.*===$" syn match helpSectionDelim "^-\{3,}.*--$" @@ -196,4 +199,6 @@ hi def link helpURL String let b:current_syntax = "help" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 sw=2 diff --git a/runtime/syntax/ist.vim b/runtime/syntax/ist.vim index fd0005e554..131d833cbc 100644 --- a/runtime/syntax/ist.vim +++ b/runtime/syntax/ist.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Makeindex style file, *.ist " Maintainer: Peter Meszaros -" Last Change: May 4, 2001 +" Last Change: 2012 Jan 08 by Thilo Six " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -11,6 +11,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + if version >= 600 setlocal iskeyword=$,@,48-57,_ else @@ -67,4 +70,6 @@ endif let b:current_syntax = "ist" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 sw=2 diff --git a/runtime/syntax/jam.vim b/runtime/syntax/jam.vim index 9fe6678867..cbd99bb9ce 100644 --- a/runtime/syntax/jam.vim +++ b/runtime/syntax/jam.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: JAM " Maintainer: Ralf Lemke (ralflemk@t-online.de) -" Last change: 09-10-2000 +" Last change: 2012 Jan 08 by Thilo Six " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -11,6 +11,9 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + if version >= 600 setlocal iskeyword=@,48-57,_,- else @@ -249,4 +252,6 @@ endif let b:current_syntax = "jam" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/ninja.vim b/runtime/syntax/ninja.vim new file mode 100644 index 0000000000..22ef4a02ee --- /dev/null +++ b/runtime/syntax/ninja.vim @@ -0,0 +1,63 @@ +" ninja build file syntax. +" Language: ninja build file as described at +" http://martine.github.com/ninja/manual.html +" Version: 1.0 +" Last Change: 2012 Jan 04 +" Maintainer: Nicolas Weber + +" ninja lexer and parser are at +" https://github.com/martine/ninja/blob/master/src/lexer.in.cc +" https://github.com/martine/ninja/blob/master/src/parsers.cc + +if exists("b:current_syntax") + finish +endif + +syn case match + +" Toplevel statements are the ones listed here and +" toplevel variable assignments (ident '=' value). +" lexer.in.cc, ReadToken() and parsers.cc, Parse() +syn match ninjaKeyword "^build\>" +syn match ninjaKeyword "^rule\>" +syn match ninjaKeyword "^default\>" +syn match ninjaKeyword "^include\>" +syn match ninjaKeyword "^subninja\>" + +" Both 'build' and 'rule' begin a variable scope that ends +" on the first line without indent. 'rule' allows only a +" limited set of magic variables, 'build' allows general +" let assignments. +" parsers.cc, ParseRule() +syn region ninjaRule start="^rule" end="^\ze\S" contains=ALL transparent +syn keyword ninjaRuleCommand contained command depfile description generator restat + +" Strings are parsed as follows: +" lexer.in.cc, ReadEvalString() +" simple_varname = [a-zA-Z0-9_-]+; +" varname = [a-zA-Z0-9_.-]+; +" $$ -> $ +" $\n -> line continuation +" '$ ' -> escaped space +" $simple_varname -> variable +" ${varname} -> variable + +syn match ninjaWrapLineOperator "\$$" +syn match ninjaSimpleVar "\$[a-zA-Z0-9_-]\+" +syn match ninjaVar "\${[a-zA-Z0-9_.-]\+}" + +" operators are: +" variable assignment = +" rule definition : +" implicit dependency | +" order-only dependency || +syn match ninjaOperator "\(=\|:\||\|||\)\ze\s" + +hi def link ninjaKeyword Keyword +hi def link ninjaRuleCommand Statement +hi def link ninjaWrapLineOperator ninjaOperator +hi def link ninjaOperator Operator +hi def link ninjaSimpleVar ninjaVar +hi def link ninjaVar Identifier + +let b:current_syntax = "ninja" diff --git a/runtime/tutor/tutor.de b/runtime/tutor/tutor.de index 7438c96ba9..a78335a87a 100644 --- a/runtime/tutor/tutor.de +++ b/runtime/tutor/tutor.de @@ -374,7 +374,7 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. - 2. Tippe dd , um die Zeile zu löschen und sie in eimem Vim-Register zu + 2. Tippe dd , um die Zeile zu löschen und sie in einem Vim-Register zu speichern. 3. Bewege den Cursor zur Zeile c), ÜBER derjenigen, wo die gelöschte Zeile diff --git a/runtime/tutor/tutor.de.utf-8 b/runtime/tutor/tutor.de.utf-8 index 7b39abedce..9d5f668189 100644 --- a/runtime/tutor/tutor.de.utf-8 +++ b/runtime/tutor/tutor.de.utf-8 @@ -374,7 +374,7 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den 1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile. - 2. Tippe dd , um die Zeile zu löschen und sie in eimem Vim-Register zu + 2. Tippe dd , um die Zeile zu löschen und sie in einem Vim-Register zu speichern. 3. Bewege den Cursor zur Zeile c), ÜBER derjenigen, wo die gelöschte Zeile From c3f1ade368bd20e17c4ef9dc899aaa1180e41a55 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 16:28:45 +0100 Subject: [PATCH 14/23] updated for version 7.3.397 Problem: ":helpgrep" does not work properly when 'encoding' is not utf-8 or latin1. Solution: Convert non-ascii lines to 'encoding'. (Yasuhiro Matsumoto) --- src/misc2.c | 20 +++++++++++++++++++ src/proto/misc2.pro | 1 + src/quickfix.c | 47 +++++++++++++++++++++++++++++++++++++++------ src/spell.c | 18 ----------------- src/version.c | 2 ++ 5 files changed, 64 insertions(+), 24 deletions(-) diff --git a/src/misc2.c b/src/misc2.c index 784e4889f1..96c3a3638a 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -6541,3 +6541,23 @@ put_time(fd, the_time) #endif #endif + +#if (defined(FEAT_MBYTE) && defined(FEAT_QUICKFIX)) \ + || defined(FEAT_SPELL) || defined(PROTO) +/* + * Return TRUE if string "s" contains a non-ASCII character (128 or higher). + * When "s" is NULL FALSE is returned. + */ + int +has_non_ascii(s) + char_u *s; +{ + char_u *p; + + if (s != NULL) + for (p = s; *p != NUL; ++p) + if (*p >= 128) + return TRUE; + return FALSE; +} +#endif diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro index d8d3cc374b..16c591831b 100644 --- a/src/proto/misc2.pro +++ b/src/proto/misc2.pro @@ -116,4 +116,5 @@ time_t get8ctime __ARGS((FILE *fd)); char_u *read_string __ARGS((FILE *fd, int cnt)); int put_bytes __ARGS((FILE *fd, long_u nr, int len)); void put_time __ARGS((FILE *fd, time_t the_time)); +int has_non_ascii __ARGS((char_u *s)); /* vim: set ft=c : */ diff --git a/src/quickfix.c b/src/quickfix.c index a2935bea97..794c49380d 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3914,6 +3914,16 @@ ex_helpgrep(eap) regmatch.rm_ic = FALSE; if (regmatch.regprog != NULL) { +#ifdef FEAT_MBYTE + vimconv_T vc; + + /* Help files are in utf-8 or latin1, convert lines when 'encoding' + * differs. */ + vc.vc_type = CONV_NONE; + if (!enc_utf8) + convert_setup(&vc, (char_u *)"utf-8", p_enc); +#endif + /* create a new quickfix list */ qf_new_list(qi, *eap->cmdlinep); @@ -3948,21 +3958,33 @@ ex_helpgrep(eap) lnum = 1; while (!vim_fgets(IObuff, IOSIZE, fd) && !got_int) { - if (vim_regexec(®match, IObuff, (colnr_T)0)) + char_u *line = IObuff; +#ifdef FEAT_MBYTE + /* Convert a line if 'encoding' is not utf-8 and + * the line contains a non-ASCII character. */ + if (vc.vc_type != CONV_NONE + && has_non_ascii(IObuff)) { + line = string_convert(&vc, IObuff, NULL); + if (line == NULL) + line = IObuff; + } +#endif + + if (vim_regexec(®match, line, (colnr_T)0)) { - int l = (int)STRLEN(IObuff); + int l = (int)STRLEN(line); /* remove trailing CR, LF, spaces, etc. */ - while (l > 0 && IObuff[l - 1] <= ' ') - IObuff[--l] = NUL; + while (l > 0 && line[l - 1] <= ' ') + line[--l] = NUL; if (qf_add_entry(qi, &prevp, NULL, /* dir */ fnames[fi], 0, - IObuff, + line, lnum, - (int)(regmatch.startp[0] - IObuff) + (int)(regmatch.startp[0] - line) + 1, /* col */ FALSE, /* vis_col */ NULL, /* search pattern */ @@ -3972,9 +3994,17 @@ ex_helpgrep(eap) ) == FAIL) { got_int = TRUE; +#ifdef FEAT_MBYTE + if (line != IObuff) + vim_free(line); +#endif break; } } +#ifdef FEAT_MBYTE + if (line != IObuff) + vim_free(line); +#endif ++lnum; line_breakcheck(); } @@ -3984,7 +4014,12 @@ ex_helpgrep(eap) FreeWild(fcount, fnames); } } + vim_free(regmatch.regprog); +#ifdef FEAT_MBYTE + if (vc.vc_type != CONV_NONE) + convert_setup(&vc, NULL, NULL); +#endif qi->qf_lists[qi->qf_curlist].qf_nonevalid = FALSE; qi->qf_lists[qi->qf_curlist].qf_ptr = diff --git a/src/spell.c b/src/spell.c index 464d4d0d18..f7ec0c735f 100644 --- a/src/spell.c +++ b/src/spell.c @@ -5020,7 +5020,6 @@ static void aff_check_string __ARGS((char_u *spinval, char_u *affval, char *name static int str_equal __ARGS((char_u *s1, char_u *s2)); static void add_fromto __ARGS((spellinfo_T *spin, garray_T *gap, char_u *from, char_u *to)); static int sal_to_bool __ARGS((char_u *s)); -static int has_non_ascii __ARGS((char_u *s)); static void spell_free_aff __ARGS((afffile_T *aff)); static int spell_read_dic __ARGS((spellinfo_T *spin, char_u *fname, afffile_T *affile)); static int get_affix_flags __ARGS((afffile_T *affile, char_u *afflist)); @@ -6484,23 +6483,6 @@ sal_to_bool(s) return STRCMP(s, "1") == 0 || STRCMP(s, "true") == 0; } -/* - * Return TRUE if string "s" contains a non-ASCII character (128 or higher). - * When "s" is NULL FALSE is returned. - */ - static int -has_non_ascii(s) - char_u *s; -{ - char_u *p; - - if (s != NULL) - for (p = s; *p != NUL; ++p) - if (*p >= 128) - return TRUE; - return FALSE; -} - /* * Free the structure filled by spell_read_aff(). */ diff --git a/src/version.c b/src/version.c index e0d926def2..777c15ec6c 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 397, /**/ 396, /**/ From 1b4691a6db958c891b6ef7a9164d9a8f39460a23 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 16:28:45 +0100 Subject: [PATCH 15/23] Added tag v7-3-397 for changeset 75217982ea46 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c16e0aacc3..aa9551e8b7 100644 --- a/.hgtags +++ b/.hgtags @@ -1731,3 +1731,4 @@ e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 927c7377cf49bbbf87d12863c2a2d462c9cf97a7 v7-3-394 80c529a5650f1d70342f18c681b69d7897495006 v7-3-395 2f075595590f498f1a9cfc42dfce24cd0d980e96 v7-3-396 +75217982ea460e7bdfdd2517d8d4e4f0d0ebaef4 v7-3-397 From 29575240289e321f013635b86bea18b1ac594d80 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 17:13:52 +0100 Subject: [PATCH 16/23] =?UTF-8?q?updated=20for=20version=207.3.398=20Probl?= =?UTF-8?q?em:=20=20=20=20When=20creating=20more=20than=2010=20location=20?= =?UTF-8?q?lists=20and=20adding=20items=20one=20by=20=09=20=20=20=20one=20?= =?UTF-8?q?a=20previous=20location=20may=20be=20used.=20(Audrius=20Ka?= =?UTF-8?q?=C5=BEukauskas)=20Solution:=20=20=20Clear=20the=20location=20li?= =?UTF-8?q?st=20completely=20when=20adding=20the=20tenth=20one.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/quickfix.c | 5 +---- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/quickfix.c b/src/quickfix.c index 794c49380d..26eac7be59 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -899,8 +899,7 @@ qf_new_list(qi, qf_title) } else qi->qf_curlist = qi->qf_listcount++; - qi->qf_lists[qi->qf_curlist].qf_index = 0; - qi->qf_lists[qi->qf_curlist].qf_count = 0; + vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T))); if (qf_title != NULL) { char_u *p = alloc((int)STRLEN(qf_title) + 2); @@ -909,8 +908,6 @@ qf_new_list(qi, qf_title) if (p != NULL) sprintf((char *)p, ":%s", (char *)qf_title); } - else - qi->qf_lists[qi->qf_curlist].qf_title = NULL; } /* diff --git a/src/version.c b/src/version.c index 777c15ec6c..e3a79e294a 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 398, /**/ 397, /**/ From 8b028f7000085898a044029bd6145a3bcc45e41b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 17:13:52 +0100 Subject: [PATCH 17/23] Added tag v7-3-398 for changeset 9eb7fdfb5e63 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index aa9551e8b7..8476e1e8c8 100644 --- a/.hgtags +++ b/.hgtags @@ -1732,3 +1732,4 @@ e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 80c529a5650f1d70342f18c681b69d7897495006 v7-3-395 2f075595590f498f1a9cfc42dfce24cd0d980e96 v7-3-396 75217982ea460e7bdfdd2517d8d4e4f0d0ebaef4 v7-3-397 +9eb7fdfb5e63ad98f6feb81b03566fbdc5ebd895 v7-3-398 From 1a7c64bb81080ee5089a8c30306fa19937c00064 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 18:37:58 +0100 Subject: [PATCH 18/23] updated for version 7.3.399 Problem: ":cd" doesn't work when the path contains wildcards. (Yukihiro Nakadaira) Solution: Ignore wildcard errors when the EW_NOTWILD flag is used. --- src/misc1.c | 18 ++++++++++++------ src/version.c | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/misc1.c b/src/misc1.c index a5a3ad3147..1cd7cceee8 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -9103,15 +9103,15 @@ dos_expandpath( } /* compile the regexp into a program */ - if (flags & EW_NOERROR) + if (flags & (EW_NOERROR | EW_NOTWILD)) ++emsg_silent; regmatch.rm_ic = TRUE; /* Always ignore case */ regmatch.regprog = vim_regcomp(pat, RE_MAGIC); - if (flags & EW_NOERROR) + if (flags & (EW_NOERROR | EW_NOTWILD)) --emsg_silent; vim_free(pat); - if (regmatch.regprog == NULL) + if (regmatch.regprog == NULL && (flags & EW_NOTWILD) == 0) { vim_free(buf); return 0; @@ -9179,7 +9179,8 @@ dos_expandpath( * all entries found with "matchname". */ if ((p[0] != '.' || starts_with_dot) && (matchname == NULL - || vim_regexec(®match, p, (colnr_T)0) + || (regmatch.regprog != NULL + && vim_regexec(®match, p, (colnr_T)0)) || ((flags & EW_NOTWILD) && fnamencmp(path + (s - buf), p, e - s) == 0))) { @@ -9419,10 +9420,14 @@ unix_expandpath(gap, path, wildoff, flags, didstar) else regmatch.rm_ic = FALSE; /* Don't ignore case */ #endif + if (flags & (EW_NOERROR | EW_NOTWILD)) + ++emsg_silent; regmatch.regprog = vim_regcomp(pat, RE_MAGIC); + if (flags & (EW_NOERROR | EW_NOTWILD)) + --emsg_silent; vim_free(pat); - if (regmatch.regprog == NULL) + if (regmatch.regprog == NULL && (flags & EW_NOTWILD) == 0) { vim_free(buf); return 0; @@ -9452,7 +9457,8 @@ unix_expandpath(gap, path, wildoff, flags, didstar) if (dp == NULL) break; if ((dp->d_name[0] != '.' || starts_with_dot) - && (vim_regexec(®match, (char_u *)dp->d_name, (colnr_T)0) + && ((regmatch.regprog != NULL && vim_regexec(®match, + (char_u *)dp->d_name, (colnr_T)0)) || ((flags & EW_NOTWILD) && fnamencmp(path + (s - buf), dp->d_name, e - s) == 0))) { diff --git a/src/version.c b/src/version.c index e3a79e294a..f5e79e5134 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 399, /**/ 398, /**/ From 392d8e5ef6440e8b1af07b254143323eb9e8855e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 18:37:58 +0100 Subject: [PATCH 19/23] Added tag v7-3-399 for changeset ce6afdc00290 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 8476e1e8c8..b9d63e3950 100644 --- a/.hgtags +++ b/.hgtags @@ -1733,3 +1733,4 @@ e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 2f075595590f498f1a9cfc42dfce24cd0d980e96 v7-3-396 75217982ea460e7bdfdd2517d8d4e4f0d0ebaef4 v7-3-397 9eb7fdfb5e63ad98f6feb81b03566fbdc5ebd895 v7-3-398 +ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 From 8cba80c05b650333fd45e51baae980f62c8c8efa Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 22:26:17 +0100 Subject: [PATCH 20/23] updated for version 7.3.400 Problem: Compiler warnings for shadowed variables. Solution: Remove or rename the variables. --- src/charset.c | 27 +++++++++--------- src/digraph.c | 16 +++++------ src/edit.c | 16 +++++------ src/eval.c | 32 ++++++++++----------- src/fold.c | 6 ++-- src/getchar.c | 8 +++--- src/message.c | 38 ++++++++++++------------- src/misc2.c | 12 ++++---- src/move.c | 6 ++-- src/netbeans.c | 30 ++++++++++---------- src/option.c | 6 ++-- src/os_unix.c | 7 +++-- src/screen.c | 16 +++++------ src/search.c | 10 +++---- src/spell.c | 8 +++--- src/syntax.c | 10 +++---- src/tag.c | 3 +- src/version.c | 2 ++ src/window.c | 76 +++++++++++++++++++++++++------------------------- 19 files changed, 167 insertions(+), 162 deletions(-) diff --git a/src/charset.c b/src/charset.c index 21fb4e52c5..90cf06cebb 100644 --- a/src/charset.c +++ b/src/charset.c @@ -463,41 +463,42 @@ str_foldcase(str, orglen, buf, buflen) if (enc_utf8) { int c = utf_ptr2char(STR_PTR(i)); - int ol = utf_ptr2len(STR_PTR(i)); + int olen = utf_ptr2len(STR_PTR(i)); int lc = utf_tolower(c); /* Only replace the character when it is not an invalid * sequence (ASCII character or more than one byte) and * utf_tolower() doesn't return the original character. */ - if ((c < 0x80 || ol > 1) && c != lc) + if ((c < 0x80 || olen > 1) && c != lc) { - int nl = utf_char2len(lc); + int nlen = utf_char2len(lc); /* If the byte length changes need to shift the following * characters forward or backward. */ - if (ol != nl) + if (olen != nlen) { - if (nl > ol) + if (nlen > olen) { - if (buf == NULL ? ga_grow(&ga, nl - ol + 1) == FAIL - : len + nl - ol >= buflen) + if (buf == NULL + ? ga_grow(&ga, nlen - olen + 1) == FAIL + : len + nlen - olen >= buflen) { /* out of memory, keep old char */ lc = c; - nl = ol; + nlen = olen; } } - if (ol != nl) + if (olen != nlen) { if (buf == NULL) { - STRMOVE(GA_PTR(i) + nl, GA_PTR(i) + ol); - ga.ga_len += nl - ol; + STRMOVE(GA_PTR(i) + nlen, GA_PTR(i) + olen); + ga.ga_len += nlen - olen; } else { - STRMOVE(buf + i + nl, buf + i + ol); - len += nl - ol; + STRMOVE(buf + i + nlen, buf + i + olen); + len += nlen - olen; } } } diff --git a/src/digraph.c b/src/digraph.c index ed22b347a3..fc29ac7490 100644 --- a/src/digraph.c +++ b/src/digraph.c @@ -2080,13 +2080,13 @@ get_digraph(cmdline) /* * Lookup the pair "char1", "char2" in the digraph tables. * If no match, return "char2". - * If "meta" is TRUE and "char1" is a space, return "char2" | 0x80. + * If "meta_char" is TRUE and "char1" is a space, return "char2" | 0x80. */ static int -getexactdigraph(char1, char2, meta) +getexactdigraph(char1, char2, meta_char) int char1; int char2; - int meta; + int meta_char; { int i; int retval = 0; @@ -2159,7 +2159,7 @@ getexactdigraph(char1, char2, meta) if (retval == 0) /* digraph deleted or not found */ { - if (char1 == ' ' && meta) /* --> meta-char */ + if (char1 == ' ' && meta_char) /* --> meta-char */ return (char2 | 0x80); return char2; } @@ -2171,16 +2171,16 @@ getexactdigraph(char1, char2, meta) * Allow for both char1-char2 and char2-char1 */ int -getdigraph(char1, char2, meta) +getdigraph(char1, char2, meta_char) int char1; int char2; - int meta; + int meta_char; { int retval; - if (((retval = getexactdigraph(char1, char2, meta)) == char2) + if (((retval = getexactdigraph(char1, char2, meta_char)) == char2) && (char1 != char2) - && ((retval = getexactdigraph(char2, char1, meta)) == char1)) + && ((retval = getexactdigraph(char2, char1, meta_char)) == char1)) return char2; return retval; } diff --git a/src/edit.c b/src/edit.c index daab0fee7f..4289ff5cda 100644 --- a/src/edit.c +++ b/src/edit.c @@ -4003,24 +4003,24 @@ ins_compl_add_list(list) ins_compl_add_dict(dict) dict_T *dict; { - dictitem_T *refresh; - dictitem_T *words; + dictitem_T *di_refresh; + dictitem_T *di_words; /* Check for optional "refresh" item. */ compl_opt_refresh_always = FALSE; - refresh = dict_find(dict, (char_u *)"refresh", 7); - if (refresh != NULL && refresh->di_tv.v_type == VAR_STRING) + di_refresh = dict_find(dict, (char_u *)"refresh", 7); + if (di_refresh != NULL && di_refresh->di_tv.v_type == VAR_STRING) { - char_u *v = refresh->di_tv.vval.v_string; + char_u *v = di_refresh->di_tv.vval.v_string; if (v != NULL && STRCMP(v, (char_u *)"always") == 0) compl_opt_refresh_always = TRUE; } /* Add completions from a "words" list. */ - words = dict_find(dict, (char_u *)"words", 5); - if (words != NULL && words->di_tv.v_type == VAR_LIST) - ins_compl_add_list(words->di_tv.vval.v_list); + di_words = dict_find(dict, (char_u *)"words", 5); + if (di_words != NULL && di_words->di_tv.v_type == VAR_LIST) + ins_compl_add_list(di_words->di_tv.vval.v_list); } /* diff --git a/src/eval.c b/src/eval.c index 402d09d5b5..16e740f6de 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6573,15 +6573,15 @@ list2string(tv, copyID) /* * Join list "l" into a string in "*gap", using separator "sep". - * When "echo" is TRUE use String as echoed, otherwise as inside a List. + * When "echo_style" is TRUE use String as echoed, otherwise as inside a List. * Return FAIL or OK. */ static int -list_join(gap, l, sep, echo, copyID) +list_join(gap, l, sep, echo_style, copyID) garray_T *gap; list_T *l; char_u *sep; - int echo; + int echo_style; int copyID; { int first = TRUE; @@ -6597,7 +6597,7 @@ list_join(gap, l, sep, echo, copyID) else ga_concat(gap, sep); - if (echo) + if (echo_style) s = echo_string(&item->li_tv, &tofree, numbuf, copyID); else s = tv2string(&item->li_tv, &tofree, numbuf, copyID); @@ -17893,7 +17893,7 @@ f_tr(argvars, rettv) typval_T *argvars; typval_T *rettv; { - char_u *instr; + char_u *in_str; char_u *fromstr; char_u *tostr; char_u *p; @@ -17910,7 +17910,7 @@ f_tr(argvars, rettv) char_u buf2[NUMBUFLEN]; garray_T ga; - instr = get_tv_string(&argvars[0]); + in_str = get_tv_string(&argvars[0]); fromstr = get_tv_string_buf_chk(&argvars[1], buf); tostr = get_tv_string_buf_chk(&argvars[2], buf2); @@ -17936,19 +17936,19 @@ error: } /* fromstr and tostr have to contain the same number of chars */ - while (*instr != NUL) + while (*in_str != NUL) { #ifdef FEAT_MBYTE if (has_mbyte) { - inlen = (*mb_ptr2len)(instr); - cpstr = instr; + inlen = (*mb_ptr2len)(in_str); + cpstr = in_str; cplen = inlen; idx = 0; for (p = fromstr; *p != NUL; p += fromlen) { fromlen = (*mb_ptr2len)(p); - if (fromlen == inlen && STRNCMP(instr, p, inlen) == 0) + if (fromlen == inlen && STRNCMP(in_str, p, inlen) == 0) { for (p = tostr; *p != NUL; p += tolen) { @@ -17967,11 +17967,11 @@ error: ++idx; } - if (first && cpstr == instr) + if (first && cpstr == in_str) { /* Check that fromstr and tostr have the same number of * (multi-byte) characters. Done only once when a character - * of instr doesn't appear in fromstr. */ + * of in_str doesn't appear in fromstr. */ first = FALSE; for (p = tostr; *p != NUL; p += tolen) { @@ -17986,18 +17986,18 @@ error: mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen); ga.ga_len += cplen; - instr += inlen; + in_str += inlen; } else #endif { /* When not using multi-byte chars we can do it faster. */ - p = vim_strchr(fromstr, *instr); + p = vim_strchr(fromstr, *in_str); if (p != NULL) ga_append(&ga, tostr[p - fromstr]); else - ga_append(&ga, *instr); - ++instr; + ga_append(&ga, *in_str); + ++in_str; } } diff --git a/src/fold.c b/src/fold.c index 3b7a9597cc..4d294f1339 100644 --- a/src/fold.c +++ b/src/fold.c @@ -1033,10 +1033,10 @@ foldMoveTo(updown, dir, count) * Init the fold info in a new window. */ void -foldInitWin(newwin) - win_T *newwin; +foldInitWin(new_win) + win_T *new_win; { - ga_init2(&newwin->w_folds, (int)sizeof(fold_T), 10); + ga_init2(&new_win->w_folds, (int)sizeof(fold_T), 10); } /* find_wl_entry() {{{2 */ diff --git a/src/getchar.c b/src/getchar.c index c4457c4f0f..3d6b0b23a3 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -418,12 +418,12 @@ typeahead_noflush(c) /* * Remove the contents of the stuff buffer and the mapped characters in the - * typeahead buffer (used in case of an error). If 'typeahead' is true, + * typeahead buffer (used in case of an error). If "flush_typeahead" is true, * flush all typeahead characters (used when interrupted by a CTRL-C). */ void -flush_buffers(typeahead) - int typeahead; +flush_buffers(flush_typeahead) + int flush_typeahead; { init_typebuf(); @@ -431,7 +431,7 @@ flush_buffers(typeahead) while (read_stuff(TRUE) != NUL) ; - if (typeahead) /* remove all typeahead */ + if (flush_typeahead) /* remove all typeahead */ { /* * We have to get all characters, because we may delete the first part diff --git a/src/message.c b/src/message.c index 6cd3fa2abc..03a7ea534b 100644 --- a/src/message.c +++ b/src/message.c @@ -2487,7 +2487,7 @@ do_more_prompt(typed_char) #ifdef FEAT_CON_DIALOG int retval = FALSE; #endif - int scroll; + int toscroll; msgchunk_T *mp_last = NULL; msgchunk_T *mp; int i; @@ -2538,49 +2538,49 @@ do_more_prompt(typed_char) } #endif - scroll = 0; + toscroll = 0; switch (c) { case BS: /* scroll one line back */ case K_BS: case 'k': case K_UP: - scroll = -1; + toscroll = -1; break; case CAR: /* one extra line */ case NL: case 'j': case K_DOWN: - scroll = 1; + toscroll = 1; break; case 'u': /* Up half a page */ - scroll = -(Rows / 2); + toscroll = -(Rows / 2); break; case 'd': /* Down half a page */ - scroll = Rows / 2; + toscroll = Rows / 2; break; case 'b': /* one page back */ case K_PAGEUP: - scroll = -(Rows - 1); + toscroll = -(Rows - 1); break; case ' ': /* one extra page */ case 'f': case K_PAGEDOWN: case K_LEFTMOUSE: - scroll = Rows - 1; + toscroll = Rows - 1; break; case 'g': /* all the way back to the start */ - scroll = -999999; + toscroll = -999999; break; case 'G': /* all the way to the end */ - scroll = 999999; + toscroll = 999999; lines_left = 999999; break; @@ -2633,9 +2633,9 @@ do_more_prompt(typed_char) continue; } - if (scroll != 0) + if (toscroll != 0) { - if (scroll < 0) + if (toscroll < 0) { /* go to start of last line */ if (mp_last == NULL) @@ -2653,7 +2653,7 @@ do_more_prompt(typed_char) if (mp != NULL && mp->sb_prev != NULL) { /* Find line to be displayed at top. */ - for (i = 0; i > scroll; --i) + for (i = 0; i > toscroll; --i) { if (mp == NULL || mp->sb_prev == NULL) break; @@ -2664,7 +2664,7 @@ do_more_prompt(typed_char) mp_last = msg_sb_start(mp_last->sb_prev); } - if (scroll == -1 && screen_ins_lines(0, 0, 1, + if (toscroll == -1 && screen_ins_lines(0, 0, 1, (int)Rows, NULL) == OK) { /* display line at top */ @@ -2680,13 +2680,13 @@ do_more_prompt(typed_char) ++msg_scrolled; } } - scroll = 0; + toscroll = 0; } } else { /* First display any text that we scrolled back. */ - while (scroll > 0 && mp_last != NULL) + while (toscroll > 0 && mp_last != NULL) { /* scroll up, display line at bottom */ msg_scroll_up(); @@ -2694,11 +2694,11 @@ do_more_prompt(typed_char) screen_fill((int)Rows - 2, (int)Rows - 1, 0, (int)Columns, ' ', ' ', 0); mp_last = disp_sb_line((int)Rows - 2, mp_last); - --scroll; + --toscroll; } } - if (scroll <= 0) + if (toscroll <= 0) { /* displayed the requested text, more prompt again */ screen_fill((int)Rows - 1, (int)Rows, 0, @@ -2708,7 +2708,7 @@ do_more_prompt(typed_char) } /* display more text, return to caller */ - lines_left = scroll; + lines_left = toscroll; } break; diff --git a/src/misc2.c b/src/misc2.c index 96c3a3638a..22d1fb46b1 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1559,7 +1559,7 @@ strup_save(orig) if (enc_utf8) { int c, uc; - int nl; + int newl; char_u *s; c = utf_ptr2char(p); @@ -1568,21 +1568,21 @@ strup_save(orig) /* Reallocate string when byte count changes. This is rare, * thus it's OK to do another malloc()/free(). */ l = utf_ptr2len(p); - nl = utf_char2len(uc); - if (nl != l) + newl = utf_char2len(uc); + if (newl != l) { - s = alloc((unsigned)STRLEN(res) + 1 + nl - l); + s = alloc((unsigned)STRLEN(res) + 1 + newl - l); if (s == NULL) break; mch_memmove(s, res, p - res); - STRCPY(s + (p - res) + nl, p + l); + STRCPY(s + (p - res) + newl, p + l); p = s + (p - res); vim_free(res); res = s; } utf_char2bytes(uc, p); - p += nl; + p += newl; } else if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1) p += l; /* skip multi-byte character */ diff --git a/src/move.c b/src/move.c index 79df9285ad..f922da8e46 100644 --- a/src/move.c +++ b/src/move.c @@ -926,8 +926,8 @@ curwin_col_off2() * Also updates curwin->w_leftcol. */ void -curs_columns(scroll) - int scroll; /* when TRUE, may scroll horizontally */ +curs_columns(may_scroll) + int may_scroll; /* when TRUE, may scroll horizontally */ { int diff; int extra; /* offset for first screen line */ @@ -1014,7 +1014,7 @@ curs_columns(scroll) /* No line wrapping: compute curwin->w_leftcol if scrolling is on and line * is not folded. * If scrolling is off, curwin->w_leftcol is assumed to be 0 */ - else if (scroll + else if (may_scroll #ifdef FEAT_FOLDING && !curwin->w_cline_folded #endif diff --git a/src/netbeans.c b/src/netbeans.c index 59348f0288..267daff149 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -1395,7 +1395,7 @@ nb_do_cmd( int cmdno, char_u *args) /* points to space before arguments or NUL */ { - int doupdate = 0; + int do_update = 0; long off = 0; nbbuf_T *buf = nb_get_buf(bufno); static int skip = 0; @@ -1600,7 +1600,7 @@ nb_do_cmd( last.lnum, last.col)); del_from_lnum = first.lnum; del_to_lnum = last.lnum; - doupdate = 1; + do_update = 1; /* Get the position of the first byte after the deleted * section. "next" is NULL when deleting to the end of the @@ -1777,7 +1777,7 @@ nb_do_cmd( lnum = lnum_start; /* Loop over the "\n" separated lines of the argument. */ - doupdate = 1; + do_update = 1; while (*args != NUL) { nl = vim_strchr(args, '\n'); @@ -1992,7 +1992,7 @@ nb_do_cmd( EMSG("E640: invalid buffer identifier in initDone"); return FAIL; } - doupdate = 1; + do_update = 1; buf->initDone = TRUE; nb_set_curbuf(buf->bufp); #if defined(FEAT_AUTOCMD) @@ -2081,7 +2081,7 @@ nb_do_cmd( ECMD_HIDE + ECMD_OLDBUF, curwin); buf->bufp = curbuf; buf->initDone = TRUE; - doupdate = 1; + do_update = 1; #if defined(FEAT_TITLE) maketitle(); #endif @@ -2109,7 +2109,7 @@ nb_do_cmd( exarg.forceit = FALSE; dosetvisible = TRUE; goto_buffer(&exarg, DOBUF_FIRST, FORWARD, buf->bufp->b_fnum); - doupdate = 1; + do_update = 1; dosetvisible = FALSE; #ifdef FEAT_GUI @@ -2309,7 +2309,7 @@ nb_do_cmd( buf->bufp->b_fnum, TRUE); buf->bufp = NULL; buf->initDone = FALSE; - doupdate = 1; + do_update = 1; /* =====================================================================*/ } else if (streq((char *)cmd, "setStyle")) /* obsolete... */ @@ -2400,7 +2400,7 @@ nb_do_cmd( return FAIL; } - doupdate = 1; + do_update = 1; cp = (char *)args; serNum = strtol(cp, &cp, 10); @@ -2448,7 +2448,7 @@ nb_do_cmd( nbdebug((" invalid buffer identifier in removeAnno\n")); return FAIL; } - doupdate = 1; + do_update = 1; cp = (char *)args; serNum = strtol(cp, &cp, 10); args = (char_u *)cp; @@ -2493,7 +2493,7 @@ nb_do_cmd( len = strtol(cp, NULL, 10); args = (char_u *)cp; pos = off2pos(buf->bufp, off); - doupdate = 1; + do_update = 1; if (!pos) nbdebug((" no such start pos in %s, %ld\n", cmd, off)); else @@ -2555,7 +2555,7 @@ nb_do_cmd( inAtomic = 0; if (needupdate) { - doupdate = 1; + do_update = 1; needupdate = 0; } /* =====================================================================*/ @@ -2636,18 +2636,18 @@ nb_do_cmd( * Unrecognized command is ignored. */ } - if (inAtomic && doupdate) + if (inAtomic && do_update) { needupdate = 1; - doupdate = 0; + do_update = 0; } /* * Is this needed? I moved the netbeans_Xt_connect() later during startup * and it may no longer be necessary. If its not needed then needupdate - * and doupdate can also be removed. + * and do_update can also be removed. */ - if (buf != NULL && buf->initDone && doupdate) + if (buf != NULL && buf->initDone && do_update) { update_screen(NOT_VALID); setcursor(); diff --git a/src/option.c b/src/option.c index f6ed2d3706..60956d7854 100644 --- a/src/option.c +++ b/src/option.c @@ -8584,8 +8584,8 @@ check_redraw(flags) long_u flags; { /* Careful: P_RCLR and P_RALL are a combination of other P_ flags */ - int clear = (flags & P_RCLR) == P_RCLR; - int all = ((flags & P_RALL) == P_RALL || clear); + int doclear = (flags & P_RCLR) == P_RCLR; + int all = ((flags & P_RALL) == P_RALL || doclear); #ifdef FEAT_WINDOWS if ((flags & P_RSTAT) || all) /* mark all status lines dirty */ @@ -8596,7 +8596,7 @@ check_redraw(flags) changed_window_setting(); if (flags & P_RBUF) redraw_curbuf_later(NOT_VALID); - if (clear) + if (doclear) redraw_all_later(CLEAR); else if (all) redraw_all_later(NOT_VALID); diff --git a/src/os_unix.c b/src/os_unix.c index cdf5abe7fe..30593ef47b 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3884,7 +3884,6 @@ mch_call_shell(cmd, options) char_u *p_shcf_copy = NULL; int i; char_u *p; - char_u *s; int inquote; int pty_master_fd = -1; /* for pty's */ # ifdef FEAT_GUI @@ -3963,6 +3962,8 @@ mch_call_shell(cmd, options) } if (cmd != NULL) { + char_u *s; + if (extra_shell_arg != NULL) argv[argc++] = (char *)extra_shell_arg; @@ -4325,7 +4326,6 @@ mch_call_shell(cmd, options) linenr_T lnum = curbuf->b_op_start.lnum; int written = 0; char_u *lp = ml_get(lnum); - char_u *s; size_t l; close(fromshell_fd); @@ -4339,7 +4339,8 @@ mch_call_shell(cmd, options) len = write(toshell_fd, "", (size_t)1); else { - s = vim_strchr(lp + written, NL); + char_u *s = vim_strchr(lp + written, NL); + len = write(toshell_fd, (char *)lp + written, s == NULL ? l : (size_t)(s - (lp + written))); diff --git a/src/screen.c b/src/screen.c index ad2d345f07..ffbd1c34e5 100644 --- a/src/screen.c +++ b/src/screen.c @@ -7849,15 +7849,15 @@ check_for_delay(check_msg_scroll) /* * screen_valid - allocate screen buffers if size changed - * If "clear" is TRUE: clear screen if it has been resized. + * If "doclear" is TRUE: clear screen if it has been resized. * Returns TRUE if there is a valid screen to write to. * Returns FALSE when starting up and screen not initialized yet. */ int -screen_valid(clear) - int clear; +screen_valid(doclear) + int doclear; { - screenalloc(clear); /* allocate screen buffers if size changed */ + screenalloc(doclear); /* allocate screen buffers if size changed */ return (ScreenLines != NULL); } @@ -7872,8 +7872,8 @@ screen_valid(clear) * final size of the shell is needed. */ void -screenalloc(clear) - int clear; +screenalloc(doclear) + int doclear; { int new_row, old_row; #ifdef FEAT_GUI @@ -8069,7 +8069,7 @@ give_up: * (used when resizing the window at the "--more--" prompt or when * executing an external command, for the GUI). */ - if (!clear) + if (!doclear) { (void)vim_memset(new_ScreenLines + new_row * Columns, ' ', (size_t)Columns * sizeof(schar_T)); @@ -8159,7 +8159,7 @@ give_up: screen_Columns = Columns; must_redraw = CLEAR; /* need to clear the screen later */ - if (clear) + if (doclear) screenclear2(); #ifdef FEAT_GUI diff --git a/src/search.c b/src/search.c index 5a6a940c0c..c9d4b5ea26 100644 --- a/src/search.c +++ b/src/search.c @@ -2402,24 +2402,24 @@ check_linecomment(line) { if (vim_strchr(p, ';') != NULL) /* there may be comments */ { - int instr = FALSE; /* inside of string */ + int in_str = FALSE; /* inside of string */ p = line; /* scan from start */ while ((p = vim_strpbrk(p, (char_u *)"\";")) != NULL) { if (*p == '"') { - if (instr) + if (in_str) { if (*(p - 1) != '\\') /* skip escaped quote */ - instr = FALSE; + in_str = FALSE; } else if (p == line || ((p - line) >= 2 /* skip #\" form */ && *(p - 1) != '\\' && *(p - 2) != '#')) - instr = TRUE; + in_str = TRUE; } - else if (!instr && ((p - line) < 2 + else if (!in_str && ((p - line) < 2 || (*(p - 1) != '\\' && *(p - 2) != '#'))) break; /* found! */ ++p; diff --git a/src/spell.c b/src/spell.c index f7ec0c735f..f3d64e7c56 100644 --- a/src/spell.c +++ b/src/spell.c @@ -5049,7 +5049,7 @@ static int sug_filltable __ARGS((spellinfo_T *spin, wordnode_T *node, int startw static int offset2bytes __ARGS((int nr, char_u *buf)); static int bytes2offset __ARGS((char_u **pp)); static void sug_write __ARGS((spellinfo_T *spin, char_u *fname)); -static void mkspell __ARGS((int fcount, char_u **fnames, int ascii, int overwrite, int added_word)); +static void mkspell __ARGS((int fcount, char_u **fnames, int ascii, int over_write, int added_word)); static void spell_message __ARGS((spellinfo_T *spin, char_u *str)); static void init_spellfile __ARGS((void)); @@ -9085,11 +9085,11 @@ close_spellbuf(buf) * and ".spl" is appended to make the output file name. */ static void -mkspell(fcount, fnames, ascii, overwrite, added_word) +mkspell(fcount, fnames, ascii, over_write, added_word) int fcount; char_u **fnames; int ascii; /* -ascii argument given */ - int overwrite; /* overwrite existing output file */ + int over_write; /* overwrite existing output file */ int added_word; /* invoked through "zg" */ { char_u *fname = NULL; @@ -9173,7 +9173,7 @@ mkspell(fcount, fnames, ascii, overwrite, added_word) { /* Check for overwriting before doing things that may take a lot of * time. */ - if (!overwrite && mch_stat((char *)wfname, &st) >= 0) + if (!over_write && mch_stat((char *)wfname, &st) >= 0) { EMSG(_(e_exists)); goto theend; diff --git a/src/syntax.c b/src/syntax.c index f3cb71ed65..d63c26018f 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -4006,17 +4006,17 @@ syn_list_one(id, syncing, link_only) } static void -syn_list_flags(nl, flags, attr) - struct name_list *nl; +syn_list_flags(nlist, flags, attr) + struct name_list *nlist; int flags; int attr; { int i; - for (i = 0; nl[i].flag != 0; ++i) - if (flags & nl[i].flag) + for (i = 0; nlist[i].flag != 0; ++i) + if (flags & nlist[i].flag) { - msg_puts_attr((char_u *)nl[i].name, attr); + msg_puts_attr((char_u *)nlist[i].name, attr); msg_putchar(' '); } } diff --git a/src/tag.c b/src/tag.c index 41c7c582e7..08abd41758 100644 --- a/src/tag.c +++ b/src/tag.c @@ -1353,7 +1353,6 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname) int match_count = 0; /* number of matches found */ char_u **matches; int mtt; - int len; int help_save; #ifdef FEAT_MULTI_LANG int help_pri = 0; @@ -2235,6 +2234,8 @@ line_read_in: */ if (ga_grow(&ga_match[mtt], 1) == OK) { + int len; + if (help_only) { #ifdef FEAT_MULTI_LANG diff --git a/src/version.c b/src/version.c index f5e79e5134..fbafa054d8 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 400, /**/ 399, /**/ diff --git a/src/window.c b/src/window.c index 80c69a1e72..9c433747aa 100644 --- a/src/window.c +++ b/src/window.c @@ -683,19 +683,19 @@ win_split(size, flags) } /* - * When "newwin" is NULL: split the current window in two. - * When "newwin" is not NULL: insert this window at the far + * When "new_wp" is NULL: split the current window in two. + * When "new_wp" is not NULL: insert this window at the far * top/left/right/bottom. * return FAIL for failure, OK otherwise */ int -win_split_ins(size, flags, newwin, dir) +win_split_ins(size, flags, new_wp, dir) int size; int flags; - win_T *newwin; + win_T *new_wp; int dir; { - win_T *wp = newwin; + win_T *wp = new_wp; win_T *oldwin; int new_size = size; int i; @@ -718,7 +718,7 @@ win_split_ins(size, flags, newwin, dir) /* add a status line when p_ls == 1 and splitting the first window */ if (lastwin == firstwin && p_ls == 1 && oldwin->w_status_height == 0) { - if (oldwin->w_height <= p_wmh && newwin == NULL) + if (oldwin->w_height <= p_wmh && new_wp == NULL) { EMSG(_(e_noroom)); return FAIL; @@ -751,7 +751,7 @@ win_split_ins(size, flags, newwin, dir) } else available = oldwin->w_width; - if (available < needed && newwin == NULL) + if (available < needed && new_wp == NULL) { EMSG(_(e_noroom)); return FAIL; @@ -815,7 +815,7 @@ win_split_ins(size, flags, newwin, dir) available = oldwin->w_height; needed += p_wmh; } - if (available < needed && newwin == NULL) + if (available < needed && new_wp == NULL) { EMSG(_(e_noroom)); return FAIL; @@ -888,20 +888,20 @@ win_split_ins(size, flags, newwin, dir) p_sb)))) { /* new window below/right of current one */ - if (newwin == NULL) + if (new_wp == NULL) wp = win_alloc(oldwin, FALSE); else win_append(oldwin, wp); } else { - if (newwin == NULL) + if (new_wp == NULL) wp = win_alloc(oldwin->w_prev, FALSE); else win_append(oldwin->w_prev, wp); } - if (newwin == NULL) + if (new_wp == NULL) { if (wp == NULL) return FAIL; @@ -972,10 +972,10 @@ win_split_ins(size, flags, newwin, dir) frp->fr_parent = curfrp; } - if (newwin == NULL) + if (new_wp == NULL) frp = wp->w_frame; else - frp = newwin->w_frame; + frp = new_wp->w_frame; frp->fr_parent = curfrp->fr_parent; /* Insert the new frame at the right place in the frame list. */ @@ -4284,19 +4284,19 @@ win_alloc(after, hidden) win_T *after UNUSED; int hidden UNUSED; { - win_T *newwin; + win_T *new_wp; /* * allocate window structure and linesizes arrays */ - newwin = (win_T *)alloc_clear((unsigned)sizeof(win_T)); - if (newwin != NULL && win_alloc_lines(newwin) == FAIL) + new_wp = (win_T *)alloc_clear((unsigned)sizeof(win_T)); + if (new_wp != NULL && win_alloc_lines(new_wp) == FAIL) { - vim_free(newwin); - newwin = NULL; + vim_free(new_wp); + new_wp = NULL; } - if (newwin != NULL) + if (new_wp != NULL) { #ifdef FEAT_AUTOCMD /* Don't execute autocommands while the window is not properly @@ -4309,53 +4309,53 @@ win_alloc(after, hidden) */ #ifdef FEAT_WINDOWS if (!hidden) - win_append(after, newwin); + win_append(after, new_wp); #endif #ifdef FEAT_VERTSPLIT - newwin->w_wincol = 0; - newwin->w_width = Columns; + new_wp->w_wincol = 0; + new_wp->w_width = Columns; #endif /* position the display and the cursor at the top of the file. */ - newwin->w_topline = 1; + new_wp->w_topline = 1; #ifdef FEAT_DIFF - newwin->w_topfill = 0; + new_wp->w_topfill = 0; #endif - newwin->w_botline = 2; - newwin->w_cursor.lnum = 1; + new_wp->w_botline = 2; + new_wp->w_cursor.lnum = 1; #ifdef FEAT_SCROLLBIND - newwin->w_scbind_pos = 1; + new_wp->w_scbind_pos = 1; #endif /* We won't calculate w_fraction until resizing the window */ - newwin->w_fraction = 0; - newwin->w_prev_fraction_row = -1; + new_wp->w_fraction = 0; + new_wp->w_prev_fraction_row = -1; #ifdef FEAT_GUI if (gui.in_use) { - gui_create_scrollbar(&newwin->w_scrollbars[SBAR_LEFT], - SBAR_LEFT, newwin); - gui_create_scrollbar(&newwin->w_scrollbars[SBAR_RIGHT], - SBAR_RIGHT, newwin); + gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_LEFT], + SBAR_LEFT, new_wp); + gui_create_scrollbar(&new_wp->w_scrollbars[SBAR_RIGHT], + SBAR_RIGHT, new_wp); } #endif #ifdef FEAT_EVAL /* init w: variables */ - init_var_dict(&newwin->w_vars, &newwin->w_winvar); + init_var_dict(&new_wp->w_vars, &new_wp->w_winvar); #endif #ifdef FEAT_FOLDING - foldInitWin(newwin); + foldInitWin(new_wp); #endif #ifdef FEAT_AUTOCMD unblock_autocmds(); #endif #ifdef FEAT_SEARCH_EXTRA - newwin->w_match_head = NULL; - newwin->w_next_match_id = 4; + new_wp->w_match_head = NULL; + new_wp->w_next_match_id = 4; #endif } - return newwin; + return new_wp; } #if defined(FEAT_WINDOWS) || defined(PROTO) From 7fa72e12b2f5a54dc762267d13a31fdcb7ff8af7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 22:26:17 +0100 Subject: [PATCH 21/23] Added tag v7-3-400 for changeset 320cc46d0eb0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index b9d63e3950..7d19e50694 100644 --- a/.hgtags +++ b/.hgtags @@ -1734,3 +1734,4 @@ e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 75217982ea460e7bdfdd2517d8d4e4f0d0ebaef4 v7-3-397 9eb7fdfb5e63ad98f6feb81b03566fbdc5ebd895 v7-3-398 ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 +320cc46d0eb022bfb24d1b636050becc83ac0014 v7-3-400 From 1ea3c6ba0905dfb4ab6601ee53cb64920690bfbb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 22:31:31 +0100 Subject: [PATCH 22/23] updated for version 7.3.401 Problem: A couple more shadowed variables. Solution: Rename the variables. --- src/netbeans.c | 26 ++++++++++++++------------ src/version.c | 2 ++ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/netbeans.c b/src/netbeans.c index 267daff149..e38d8835af 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -443,7 +443,7 @@ getConnInfo(char *file, char **host, char **port, char **auth) FILE *fp; char_u buf[BUFSIZ]; char_u *lp; - char_u *nl; + char_u *nlp; #ifdef UNIX struct stat st; @@ -472,8 +472,8 @@ getConnInfo(char *file, char **host, char **port, char **auth) /* Read the file. There should be one of each parameter */ while ((lp = (char_u *)fgets((char *)buf, BUFSIZ, fp)) != NULL) { - if ((nl = vim_strchr(lp, '\n')) != NULL) - *nl = 0; /* strip off the trailing newline */ + if ((nlp = vim_strchr(lp, '\n')) != NULL) + *nlp = 0; /* strip off the trailing newline */ if (STRNCMP(lp, "host=", 5) == 0) { @@ -1740,7 +1740,7 @@ nb_do_cmd( int added = 0; int oldFire = netbeansFireChanges; int old_b_changed; - char_u *nl; + char_u *nlp; linenr_T lnum; linenr_T lnum_start; pos_T *pos; @@ -1780,8 +1780,8 @@ nb_do_cmd( do_update = 1; while (*args != NUL) { - nl = vim_strchr(args, '\n'); - if (nl == NULL) + nlp = vim_strchr(args, '\n'); + if (nlp == NULL) { /* Incomplete line, probably truncated. Next "insert" * command should append to this one. */ @@ -1789,13 +1789,13 @@ nb_do_cmd( } else { - len = nl - args; + len = nlp - args; /* * We need to detect EOL style, because the commands * use a character offset. */ - if (nl > args && nl[-1] == '\r') + if (nlp > args && nlp[-1] == '\r') { ff_detected = EOL_DOS; --len; @@ -1814,7 +1814,8 @@ nb_do_cmd( /* Insert halfway a line. For simplicity we assume we * need to append to the line. */ - newline = alloc_check((unsigned)(STRLEN(oldline) + len + 1)); + newline = alloc_check( + (unsigned)(STRLEN(oldline) + len + 1)); if (newline != NULL) { STRCPY(newline, oldline); @@ -1826,14 +1827,15 @@ nb_do_cmd( { /* Append a new line. Not that we always do this, * also when the text doesn't end in a "\n". */ - ml_append((linenr_T)(lnum - 1), args, (colnr_T)(len + 1), FALSE); + ml_append((linenr_T)(lnum - 1), args, + (colnr_T)(len + 1), FALSE); ++added; } - if (nl == NULL) + if (nlp == NULL) break; ++lnum; - args = nl + 1; + args = nlp + 1; } /* Adjust the marks below the inserted lines. */ diff --git a/src/version.c b/src/version.c index fbafa054d8..4169c3ef05 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 401, /**/ 400, /**/ From 5fc58ce084c673056010377eaba09c0635c14ea7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 10 Jan 2012 22:31:32 +0100 Subject: [PATCH 23/23] Added tag v7-3-401 for changeset 1251e1ce9461 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 7d19e50694..99531b9391 100644 --- a/.hgtags +++ b/.hgtags @@ -1735,3 +1735,4 @@ e0248b732a5cf0c4e6d61253564f3f855d11a755 v7-3-393 9eb7fdfb5e63ad98f6feb81b03566fbdc5ebd895 v7-3-398 ce6afdc00290520fb2d9677b44a0cbb70bc401e6 v7-3-399 320cc46d0eb022bfb24d1b636050becc83ac0014 v7-3-400 +1251e1ce94610b265d3c1f636d379a0504cf2ae5 v7-3-401