From 9d405f05b6321352b588f54f44f237a23ca74ec8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 14:44:54 +0200 Subject: [PATCH 01/23] updated for version 7.3.323 Problem: The default 'errorformat' does not ignore some "included from" lines. Solution: Add a few more patterns. (Ben Boeckel) --- src/option.h | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/option.h b/src/option.h index 434f9f378b..1d4d950d1b 100644 --- a/src/option.h +++ b/src/option.h @@ -33,7 +33,7 @@ # ifdef EBCDIC #define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" # else -#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" +#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m" # endif # endif # endif diff --git a/src/version.c b/src/version.c index 9289490dc2..db34e7a2d6 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 323, /**/ 322, /**/ From 176870f93ae514284ed486bb0274cb0cb3b68ce4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 14:44:54 +0200 Subject: [PATCH 02/23] Added tag v7-3-323 for changeset 3bdb646fc8a4 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9e5ab7da49..c744d7a06b 100644 --- a/.hgtags +++ b/.hgtags @@ -1657,3 +1657,4 @@ dc7f2f9759208aa07bf136deca661fd080a1ee68 v7-3-319 738ea87c196431c452bd499c5a9849597ac938de v7-3-320 fc0804089b2945bfe683f9bc9ee0238b8c64a46e v7-3-321 38a7fd9043474dfb464c338ffd7f393361f5a6c1 v7-3-322 +3bdb646fc8a46ee5a5fe474dccdce098680d24d6 v7-3-323 From ac88a5268a2343d1357eecc60c1e0f64ca46cd86 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 16:23:32 +0200 Subject: [PATCH 03/23] updated for version 7.3.324 Problem: Completion for ":compiler" shows color scheme names. Solution: Fix the directory name. (James Vega) --- src/ex_getln.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 8239c0c877..da03a0494f 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4546,7 +4546,7 @@ ExpandFromContext(xp, pat, num_file, file, options) } if (xp->xp_context == EXPAND_COMPILER) { - char *directories[] = {"colors", NULL}; + char *directories[] = {"compiler", NULL}; return ExpandRTDir(pat, num_file, file, directories); } if (xp->xp_context == EXPAND_OWNSYNTAX) diff --git a/src/version.c b/src/version.c index db34e7a2d6..854cb9c716 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 324, /**/ 323, /**/ From f8a94ed692e5d350e5557cad887acbea7baec51b Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 16:23:32 +0200 Subject: [PATCH 04/23] Added tag v7-3-324 for changeset f04619f1fc16 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index c744d7a06b..71880fa8a4 100644 --- a/.hgtags +++ b/.hgtags @@ -1658,3 +1658,4 @@ dc7f2f9759208aa07bf136deca661fd080a1ee68 v7-3-319 fc0804089b2945bfe683f9bc9ee0238b8c64a46e v7-3-321 38a7fd9043474dfb464c338ffd7f393361f5a6c1 v7-3-322 3bdb646fc8a46ee5a5fe474dccdce098680d24d6 v7-3-323 +f04619f1fc1663f4ab05798c410e4fa35a9dd863 v7-3-324 From dc75ffcab33f7d91be2e4c8882e1bec31d342502 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 16:39:48 +0200 Subject: [PATCH 05/23] updated for version 7.3.325 Problem: A duplicated function argument gives an internal error. Solution: Give a proper error message. (based on patch by Tyru) --- src/eval.c | 10 ++++++++++ src/version.c | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/eval.c b/src/eval.c index 6e8c26f4a7..780ed9eca0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -20461,6 +20461,7 @@ ex_function(eap) exarg_T *eap; { char_u *theline; + int i; int j; int c; int saved_did_emsg; @@ -20707,6 +20708,15 @@ ex_function(eap) arg = vim_strsave(arg); if (arg == NULL) goto erret; + + /* Check for duplicate argument name. */ + for (i = 0; i < newargs.ga_len; ++i) + if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0) + { + EMSG2(_("E853: Duplicate argument name: %s"), arg); + goto erret; + } + ((char_u **)(newargs.ga_data))[newargs.ga_len] = arg; *p = c; newargs.ga_len++; diff --git a/src/version.c b/src/version.c index 854cb9c716..96f2ee49aa 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 325, /**/ 324, /**/ From c140e21beb8349106fbffaa62059db20fb22551f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 16:39:48 +0200 Subject: [PATCH 06/23] Added tag v7-3-325 for changeset 8aca621c0091 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 71880fa8a4..96c2f03be7 100644 --- a/.hgtags +++ b/.hgtags @@ -1659,3 +1659,4 @@ fc0804089b2945bfe683f9bc9ee0238b8c64a46e v7-3-321 38a7fd9043474dfb464c338ffd7f393361f5a6c1 v7-3-322 3bdb646fc8a46ee5a5fe474dccdce098680d24d6 v7-3-323 f04619f1fc1663f4ab05798c410e4fa35a9dd863 v7-3-324 +8aca621c00910556d4f52bd650d6841d6059d6ec v7-3-325 From 014cde7bfa0921c92cf5eab1847379dff66167fc Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 16:56:02 +0200 Subject: [PATCH 07/23] updated for version 7.3.326 Problem: MingW 4.6 no longer supports the -mno-cygwin option. Solution: Split the Cygwin and MingW makefiles. (Matsushita Shougo) --- Filelist | 1 + src/GvimExt/Make_ming.mak | 9 ++++----- src/Make_cyg.mak | 4 ++-- src/Make_ming.mak | 4 ++-- src/version.c | 2 ++ 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Filelist b/Filelist index 221137d71d..80b58fc7b3 100644 --- a/Filelist +++ b/Filelist @@ -313,6 +313,7 @@ SRC_DOS = \ src/xxd/Make_bc5.mak \ src/xxd/Make_cyg.mak \ src/xxd/Make_djg.mak \ + src/xxd/Make_ming.mak \ src/xxd/Make_mvc.mak \ nsis/gvim.nsi \ nsis/README.txt \ diff --git a/src/GvimExt/Make_ming.mak b/src/GvimExt/Make_ming.mak index d764e3f049..9c383b0b1f 100644 --- a/src/GvimExt/Make_ming.mak +++ b/src/GvimExt/Make_ming.mak @@ -1,6 +1,6 @@ # Project: gvimext # Generates gvimext.dll with gcc. -# Can be used for Cygwin and MingW (MingW ignores -mno-cygwin) +# To be used with MingW. # # Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000 # Now it is allocated dymanically by the linker by evaluating all DLLs @@ -31,12 +31,12 @@ endif ifeq ($(CROSS),yes) DEL = rm ifeq ($(MINGWOLD),yes) -CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks +CXXFLAGS := -O2 -fvtable-thunks else -CXXFLAGS := -O2 -mno-cygwin +CXXFLAGS := -O2 endif else -CXXFLAGS := -O2 -mno-cygwin +CXXFLAGS := -O2 ifneq (sh.exe, $(SHELL)) DEL = rm else @@ -75,4 +75,3 @@ $(RES): gvimext_ming.rc clean: clean-custom -$(DEL) $(OBJ) $(RES) $(DLL) - diff --git a/src/Make_cyg.mak b/src/Make_cyg.mak index 9cc3784ea2..332f946ad2 100644 --- a/src/Make_cyg.mak +++ b/src/Make_cyg.mak @@ -536,7 +536,7 @@ xxd/xxd.exe: xxd/xxd.c $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL) GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h - $(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE) + $(MAKE) -C GvimExt -f Make_cyg.mak CROSS_COMPILE=$(CROSS_COMPILE) vimrun.exe: vimrun.c $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS) @@ -565,7 +565,7 @@ ifdef MZSCHEME endif -$(DEL) pathdef.c $(MAKE) -C xxd -f Make_cyg.mak clean - $(MAKE) -C GvimExt -f Make_ming.mak clean + $(MAKE) -C GvimExt -f Make_cyg.mak clean distclean: clean -$(DEL) obj$(DIRSLASH)*.o diff --git a/src/Make_ming.mak b/src/Make_ming.mak index 88f37f67ed..5867696ae9 100644 --- a/src/Make_ming.mak +++ b/src/Make_ming.mak @@ -641,7 +641,7 @@ upx: exes upx vim.exe xxd/xxd.exe: xxd/xxd.c - $(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) + $(MAKE) -C xxd -f Make_ming.mak CC=$(CC) GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) @@ -659,7 +659,7 @@ ifdef MZSCHEME -$(DEL) mzscheme_base.c endif $(MAKE) -C GvimExt -f Make_ming.mak clean - $(MAKE) -C xxd -f Make_cyg.mak clean + $(MAKE) -C xxd -f Make_ming.mak clean ########################################################################### INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \ diff --git a/src/version.c b/src/version.c index 96f2ee49aa..02f6b9cd47 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 326, /**/ 325, /**/ From 075318e8e020f4ee9944dcb317b9beeb48990192 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 16:56:02 +0200 Subject: [PATCH 08/23] Added tag v7-3-326 for changeset d3758064ff99 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 96c2f03be7..33019b9ba6 100644 --- a/.hgtags +++ b/.hgtags @@ -1660,3 +1660,4 @@ fc0804089b2945bfe683f9bc9ee0238b8c64a46e v7-3-321 3bdb646fc8a46ee5a5fe474dccdce098680d24d6 v7-3-323 f04619f1fc1663f4ab05798c410e4fa35a9dd863 v7-3-324 8aca621c00910556d4f52bd650d6841d6059d6ec v7-3-325 +d3758064ff9946d23aeccc9d2340686766647b84 v7-3-326 From 3d4ff9d210a01b806a106c89b36b0d5736c18ec3 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 17:30:31 +0200 Subject: [PATCH 09/23] updated for version 7.3.327 Problem: When jumping to a help tag a closed fold doesn't open. Solution: Save and restore KeyTyped. (Yasuhiro Matsumoto) --- src/ex_cmds.c | 9 +++++++++ src/version.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 36b0e52281..b433bca406 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5508,6 +5508,9 @@ ex_help(eap) int len; char_u *lang; #endif +#ifdef FEAT_FOLDING + int old_KeyTyped = KeyTyped; +#endif if (eap != NULL) { @@ -5671,6 +5674,12 @@ ex_help(eap) if (!p_im) restart_edit = 0; /* don't want insert mode in help file */ +#ifdef FEAT_FOLDING + /* Restore KeyTyped, setting 'filetype=help' may reset it. + * It is needed for do_tag top open folds under the cursor. */ + KeyTyped = old_KeyTyped; +#endif + if (tag != NULL) do_tag(tag, DT_HELP, 1, FALSE, TRUE); diff --git a/src/version.c b/src/version.c index 02f6b9cd47..cca3eada8b 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 327, /**/ 326, /**/ From de67d3e25762f58e0d2f20ef01bec8142f86c501 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 17:30:31 +0200 Subject: [PATCH 10/23] Added tag v7-3-327 for changeset 9028c70adafd --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 33019b9ba6..cbab29f362 100644 --- a/.hgtags +++ b/.hgtags @@ -1661,3 +1661,4 @@ fc0804089b2945bfe683f9bc9ee0238b8c64a46e v7-3-321 f04619f1fc1663f4ab05798c410e4fa35a9dd863 v7-3-324 8aca621c00910556d4f52bd650d6841d6059d6ec v7-3-325 d3758064ff9946d23aeccc9d2340686766647b84 v7-3-326 +9028c70adafd109ab294102f74dfb5005a20bbfb v7-3-327 From 31c1fcc6b279d5ccc4b40fcdb17459e200d867e8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 17:46:21 +0200 Subject: [PATCH 11/23] updated for version 7.3.328 Problem: When command line wraps the cursor may be displayed wrong when there are multi-byte characters. Solution: Position the cursor before drawing the text. (Yasuhiro Matsumoto) --- src/ex_getln.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ex_getln.c b/src/ex_getln.c index da03a0494f..97c122da76 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -2870,6 +2870,7 @@ put_on_cmdline(str, len, redraw) { msg_no_more = TRUE; i = cmdline_row; + cursorcmd(); draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos); /* Avoid clearing the rest of the line too often. */ if (cmdline_row != i || ccline.overstrike) diff --git a/src/version.c b/src/version.c index cca3eada8b..3aa358f572 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 328, /**/ 327, /**/ From c19bca2199f645a51be0aac381558b9f5a77d0bc Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 17:46:21 +0200 Subject: [PATCH 12/23] Added tag v7-3-328 for changeset 5b53cea62e5d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index cbab29f362..1f241b98a8 100644 --- a/.hgtags +++ b/.hgtags @@ -1662,3 +1662,4 @@ f04619f1fc1663f4ab05798c410e4fa35a9dd863 v7-3-324 8aca621c00910556d4f52bd650d6841d6059d6ec v7-3-325 d3758064ff9946d23aeccc9d2340686766647b84 v7-3-326 9028c70adafd109ab294102f74dfb5005a20bbfb v7-3-327 +5b53cea62e5d1be2a1a36ce685c15f99bb8a41ba v7-3-328 From 5f19dd4ae5457faba8d83dadcde84aead50af2e9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 18:35:57 +0200 Subject: [PATCH 13/23] updated for version 7.3.329 Problem: When skipping over code from ":for" to ":endfor" get an error for calling a dict function. (Yasuhiro Matsumoto) Solution: Ignore errors when skipping over :call command. --- src/eval.c | 5 ++++- src/ex_docmd.c | 2 -- src/version.c | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/eval.c b/src/eval.c index 780ed9eca0..efbcfaf51f 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3377,7 +3377,10 @@ ex_call(eap) /* trans_function_name() doesn't work well when skipping, use eval0() * instead to skip to any following command, e.g. for: * :if 0 | call dict.foo().bar() | endif */ - eval0(eap->arg, &rettv, &eap->nextcmd, FALSE); + ++emsg_skip; + if (eval0(eap->arg, &rettv, &eap->nextcmd, FALSE) != FAIL) + clear_tv(&rettv); + --emsg_skip; return; } diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 9b5a5b164d..3008a1d347 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -371,11 +371,9 @@ static void ex_tag_cmd __ARGS((exarg_T *eap, char_u *name)); # define ex_endif ex_ni # define ex_else ex_ni # define ex_while ex_ni -# define ex_for ex_ni # define ex_continue ex_ni # define ex_break ex_ni # define ex_endwhile ex_ni -# define ex_endfor ex_ni # define ex_throw ex_ni # define ex_try ex_ni # define ex_catch ex_ni diff --git a/src/version.c b/src/version.c index 3aa358f572..edf6aaab5b 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 329, /**/ 328, /**/ From c388368a14fcc3d695939aff06b1fa3ae3a633f6 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 30 Sep 2011 18:35:57 +0200 Subject: [PATCH 14/23] Added tag v7-3-329 for changeset ec901ddc84d5 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1f241b98a8..47b2121542 100644 --- a/.hgtags +++ b/.hgtags @@ -1663,3 +1663,4 @@ f04619f1fc1663f4ab05798c410e4fa35a9dd863 v7-3-324 d3758064ff9946d23aeccc9d2340686766647b84 v7-3-326 9028c70adafd109ab294102f74dfb5005a20bbfb v7-3-327 5b53cea62e5d1be2a1a36ce685c15f99bb8a41ba v7-3-328 +ec901ddc84d5c66c5d0c1dcca093584598487f9f v7-3-329 From 8312d799a4a17710dd51367f92c39bc27f6cefbb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 3 Oct 2011 22:12:32 +0200 Subject: [PATCH 15/23] Add files aaded by patch 7.3.326. --- src/GvimExt/Make_cyg.mak | 77 ++++++++++++++++++++++++++++++++++++++++ src/xxd/Make_ming.mak | 28 +++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 src/GvimExt/Make_cyg.mak create mode 100644 src/xxd/Make_ming.mak diff --git a/src/GvimExt/Make_cyg.mak b/src/GvimExt/Make_cyg.mak new file mode 100644 index 0000000000..80a2a65d99 --- /dev/null +++ b/src/GvimExt/Make_cyg.mak @@ -0,0 +1,77 @@ +# Project: gvimext +# Generates gvimext.dll with gcc. +# To be used with Cygwin. +# +# Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000 +# Now it is allocated dymanically by the linker by evaluating all DLLs +# already loaded in memory. The binary image contains as well information +# for automatic pseudo-rebasing, if needed by the system. ALV 2004-02-29 + +# If cross-compiling set this to yes, else set it to no +CROSS = no +#CROSS = yes +# For the old MinGW 2.95 (the one you get e.g. with debian woody) +# set the following variable to yes and check if the executables are +# really named that way. +# If you have a newer MinGW or you are using cygwin set it to no and +# check also the executables +MINGWOLD = no + +# Link against the shared versions of libgcc/libstdc++ by default. Set +# STATIC_STDCPLUS to "yes" to link against static versions instead. +STATIC_STDCPLUS=no +#STATIC_STDCPLUS=yes + +# Note: -static-libstdc++ is not available until gcc 4.5.x. +LDFLAGS += -shared +ifeq (yes, $(STATIC_STDCPLUS)) +LDFLAGS += -static-libgcc -static-libstdc++ +endif + +ifeq ($(CROSS),yes) +DEL = rm +ifeq ($(MINGWOLD),yes) +CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks +else +CXXFLAGS := -O2 -mno-cygwin +endif +else +CXXFLAGS := -O2 -mno-cygwin +ifneq (sh.exe, $(SHELL)) +DEL = rm +else +DEL = del +endif +endif +CXX := $(CROSS_COMPILE)g++ +WINDRES := $(CROSS_COMPILE)windres +WINDRES_CXX = $(CXX) +WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED +LIBS := -luuid +RES := gvimext.res +DEFFILE = gvimext_ming.def +OBJ := gvimext.o + +DLL := gvimext.dll + +.PHONY: all all-before all-after clean clean-custom + +all: all-before $(DLL) all-after + +$(DLL): $(OBJ) $(RES) $(DEFFILE) + $(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \ + -Wl,--enable-auto-image-base \ + -Wl,--enable-auto-import \ + -Wl,--whole-archive \ + $^ \ + -Wl,--no-whole-archive \ + $(LIBS) + +gvimext.o: gvimext.cpp + $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ + +$(RES): gvimext_ming.rc + $(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@ + +clean: clean-custom + -$(DEL) $(OBJ) $(RES) $(DLL) diff --git a/src/xxd/Make_ming.mak b/src/xxd/Make_ming.mak new file mode 100644 index 0000000000..5147e89c15 --- /dev/null +++ b/src/xxd/Make_ming.mak @@ -0,0 +1,28 @@ +# The most simplistic Makefile, for MinGW gcc on MS-DOS + +ifndef USEDLL +USEDLL = no +endif + +ifeq (yes, $(USEDLL)) +DEFINES = +LIBS = -lc +else +DEFINES = +LIBS = +endif + +CC = gcc +CFLAGS = -O2 -Wall -DWIN32 $(DEFINES) + +ifneq (sh.exe, $(SHELL)) +DEL = rm +else +DEL = del +endif + +xxd.exe: xxd.c + $(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS) + +clean: + -$(DEL) xxd.exe From d10420e2db60f19c7c00aa443b58635c9e9d2faa Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 16:43:53 +0200 Subject: [PATCH 16/23] updated for version 7.3.330 Problem: When longjmp() is invoked if the X server gives an error the state is not properly restored. Solution: Reset vgetc_busy. (Yukihiro Nakadaira) --- src/main.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 5d3e69920c..2044893df8 100644 --- a/src/main.c +++ b/src/main.c @@ -1009,6 +1009,7 @@ main_loop(cmdwin, noexmode) skip_redraw = FALSE; RedrawingDisabled = 0; no_wait_return = 0; + vgetc_busy = 0; # ifdef FEAT_EVAL emsg_skip = 0; # endif diff --git a/src/version.c b/src/version.c index edf6aaab5b..74a32d1d7c 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 330, /**/ 329, /**/ From b802b6e322be86a02fe0e304e16346491a1c2edb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 16:43:53 +0200 Subject: [PATCH 17/23] Added tag v7-3-330 for changeset abb03be99d66 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 47b2121542..05256b4201 100644 --- a/.hgtags +++ b/.hgtags @@ -1664,3 +1664,4 @@ d3758064ff9946d23aeccc9d2340686766647b84 v7-3-326 9028c70adafd109ab294102f74dfb5005a20bbfb v7-3-327 5b53cea62e5d1be2a1a36ce685c15f99bb8a41ba v7-3-328 ec901ddc84d5c66c5d0c1dcca093584598487f9f v7-3-329 +abb03be99d661455fd3790cd25355459448fa432 v7-3-330 From 6e71ef1f6d9432a84c3f069e3b7e207b2e66a0f1 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 17:00:20 +0200 Subject: [PATCH 18/23] updated for version 7.3.331 Problem: "vit" selects wrong text when a tag name starts with the same text as an outer tag name. (Ben Fritz) Solution: Add "\>" to the pattern to check for word boundary. --- src/search.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index 0d0d26d810..5a6a940c0c 100644 --- a/src/search.c +++ b/src/search.c @@ -3927,7 +3927,7 @@ again: curwin->w_cursor = old_pos; goto theend; } - sprintf((char *)spat, "<%.*s\\%%(\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p); + sprintf((char *)spat, "<%.*s\\>\\%%(\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p); sprintf((char *)epat, "\\c", len, p); r = do_searchpair(spat, (char_u *)"", epat, FORWARD, (char_u *)"", diff --git a/src/version.c b/src/version.c index 74a32d1d7c..6b1676d2d3 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 331, /**/ 330, /**/ From e9dd1852ea2f2036bbb71979708360e7f4bbdfba Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 17:00:21 +0200 Subject: [PATCH 19/23] Added tag v7-3-331 for changeset 4b8c614c1c91 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 05256b4201..92af829a81 100644 --- a/.hgtags +++ b/.hgtags @@ -1665,3 +1665,4 @@ d3758064ff9946d23aeccc9d2340686766647b84 v7-3-326 5b53cea62e5d1be2a1a36ce685c15f99bb8a41ba v7-3-328 ec901ddc84d5c66c5d0c1dcca093584598487f9f v7-3-329 abb03be99d661455fd3790cd25355459448fa432 v7-3-330 +4b8c614c1c914ce5d712368a75dbfea9b7e44e17 v7-3-331 From b491089907df2b1b8b83630991fd2bffed4910c0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 18:03:47 +0200 Subject: [PATCH 20/23] updated for version 7.3.332 Problem: Indent after "public:" is not increased in C++ code. (Lech Lorens) Solution: Check for namespace after the regular checks. (partly by Martin Gieseking) --- src/misc1.c | 96 ++++++++++++++++++++++++-------------------- src/testdir/test3.in | 14 +++++++ src/testdir/test3.ok | 10 +++++ src/version.c | 2 + 4 files changed, 78 insertions(+), 44 deletions(-) diff --git a/src/misc1.c b/src/misc1.c index 589a145cc5..95b45479c3 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -6389,6 +6389,7 @@ get_c_indent() int lookfor_cpp_namespace = FALSE; int cont_amount = 0; /* amount for continuation line */ int original_line_islabel; + int added_to_amount = 0; for (options = curbuf->b_p_cino; *options; ) { @@ -7216,52 +7217,59 @@ get_c_indent() else amount += ind_continuation; } - else if (lookfor_cpp_namespace) + else { - if (curwin->w_cursor.lnum == ourscope) - continue; - - if (curwin->w_cursor.lnum == 0 - || curwin->w_cursor.lnum - < ourscope - FIND_NAMESPACE_LIM) - break; - - l = ml_get_curline(); - - /* - * If we're in a comment now, skip to the start of the - * comment. - */ - trypos = find_start_comment(ind_maxcomment); - if (trypos != NULL) - { - curwin->w_cursor.lnum = trypos->lnum + 1; - curwin->w_cursor.col = 0; - continue; - } - - /* - * Skip preprocessor directives and blank lines. - */ - if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum)) - continue; - - if (cin_is_cpp_namespace(l)) - { - amount += ind_cpp_namespace; - break; - } - - if (cin_nocode(l)) - continue; - - } - else if (lookfor != LOOKFOR_TERM + if (lookfor != LOOKFOR_TERM && lookfor != LOOKFOR_CPP_BASECLASS) - { - amount = scope_amount; - if (theline[0] == '{') - amount += ind_open_extra; + { + amount = scope_amount; + if (theline[0] == '{') + { + amount += ind_open_extra; + added_to_amount = ind_open_extra; + } + } + + if (lookfor_cpp_namespace) + { + /* + * Looking for C++ namespace, need to look further + * back. + */ + if (curwin->w_cursor.lnum == ourscope) + continue; + + if (curwin->w_cursor.lnum == 0 + || curwin->w_cursor.lnum + < ourscope - FIND_NAMESPACE_LIM) + break; + + l = ml_get_curline(); + + /* If we're in a comment now, skip to the start of + * the comment. */ + trypos = find_start_comment(ind_maxcomment); + if (trypos != NULL) + { + curwin->w_cursor.lnum = trypos->lnum + 1; + curwin->w_cursor.col = 0; + continue; + } + + /* Skip preprocessor directives and blank lines. */ + if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum)) + continue; + + /* Finally the actual check for "namespace". */ + if (cin_is_cpp_namespace(l)) + { + amount += ind_cpp_namespace - added_to_amount; + break; + } + + if (cin_nocode(l)) + continue; + } } break; } diff --git a/src/testdir/test3.in b/src/testdir/test3.in index 55ca2a5a7a..f987478f62 100644 --- a/src/testdir/test3.in +++ b/src/testdir/test3.in @@ -1308,6 +1308,20 @@ protected: void testfall(); }; +STARTTEST +:set cino=(0,gs,hs +2kdd]]=][ +ENDTEST + +class Foo : public Bar +{ +public: +virtual void method1(void) = 0; +virtual void method2(int arg1, +int arg2, +int arg3) = 0; +}; + STARTTEST :set cino=+20 2kdd]]=][ diff --git a/src/testdir/test3.ok b/src/testdir/test3.ok index 3962307442..c95b188464 100644 --- a/src/testdir/test3.ok +++ b/src/testdir/test3.ok @@ -1190,6 +1190,16 @@ protected: }; +class Foo : public Bar +{ + public: + virtual void method1(void) = 0; + virtual void method2(int arg1, + int arg2, + int arg3) = 0; +}; + + void foo() { diff --git a/src/version.c b/src/version.c index 6b1676d2d3..756c6366cd 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 332, /**/ 331, /**/ From 9784a17de943f902eeeb88291c4901ec69c481eb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 18:03:47 +0200 Subject: [PATCH 21/23] Added tag v7-3-332 for changeset 0ecfe54a273f --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 92af829a81..20804d5759 100644 --- a/.hgtags +++ b/.hgtags @@ -1666,3 +1666,4 @@ d3758064ff9946d23aeccc9d2340686766647b84 v7-3-326 ec901ddc84d5c66c5d0c1dcca093584598487f9f v7-3-329 abb03be99d661455fd3790cd25355459448fa432 v7-3-330 4b8c614c1c914ce5d712368a75dbfea9b7e44e17 v7-3-331 +0ecfe54a273f6bc440684aca4ebe5926a2dfc6e2 v7-3-332 From 05c65fc201f7711593292fbc26a781da196650cb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 21:22:44 +0200 Subject: [PATCH 22/23] updated for version 7.3.333 Problem: Using "." to repeat a Visual delete counts the size in bytes, not characters. (Connor Lane Smith) Solution: Store the virtual column numbers instead of byte positions. --- src/normal.c | 70 +++++++++++++++++++++++++++++++++------------------ src/version.c | 2 ++ 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/src/normal.c b/src/normal.c index c028feaaaf..6bf547016b 100644 --- a/src/normal.c +++ b/src/normal.c @@ -20,7 +20,7 @@ */ static int resel_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */ static linenr_T resel_VIsual_line_count; /* number of lines */ -static colnr_T resel_VIsual_col; /* nr of cols or end col */ +static colnr_T resel_VIsual_vcol; /* nr of cols or end col */ static int restart_VIsual_select = 0; #endif @@ -1436,7 +1436,7 @@ do_pending_operator(cap, old_col, gui_yank) /* The visual area is remembered for redo */ static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */ static linenr_T redo_VIsual_line_count; /* number of lines */ - static colnr_T redo_VIsual_col; /* number of cols or end column */ + static colnr_T redo_VIsual_vcol; /* number of cols or end column */ static long redo_VIsual_count; /* count for Visual operator */ # ifdef FEAT_VIRTUALEDIT int include_line_break = FALSE; @@ -1549,22 +1549,31 @@ do_pending_operator(cap, old_col, gui_yank) #ifdef FEAT_VISUAL if (redo_VIsual_busy) { + /* Redo of an operation on a Visual area. Use the same size from + * redo_VIsual_line_count and redo_VIsual_vcol. */ oap->start = curwin->w_cursor; curwin->w_cursor.lnum += redo_VIsual_line_count - 1; if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count) curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count; VIsual_mode = redo_VIsual_mode; - if (VIsual_mode == 'v') + if (redo_VIsual_vcol == MAXCOL || VIsual_mode == 'v') { - if (redo_VIsual_line_count <= 1) - curwin->w_cursor.col += redo_VIsual_col - 1; + if (VIsual_mode == 'v') + { + if (redo_VIsual_line_count <= 1) + { + validate_virtcol(); + curwin->w_curswant = + curwin->w_virtcol + redo_VIsual_vcol - 1; + } + else + curwin->w_curswant = redo_VIsual_vcol; + } else - curwin->w_cursor.col = redo_VIsual_col; - } - if (redo_VIsual_col == MAXCOL) - { - curwin->w_curswant = MAXCOL; - coladvance((colnr_T)MAXCOL); + { + curwin->w_curswant = MAXCOL; + } + coladvance(curwin->w_curswant); } cap->count0 = redo_VIsual_count; if (redo_VIsual_count != 0) @@ -1710,7 +1719,7 @@ do_pending_operator(cap, old_col, gui_yank) } } else if (redo_VIsual_busy) - oap->end_vcol = oap->start_vcol + redo_VIsual_col - 1; + oap->end_vcol = oap->start_vcol + redo_VIsual_vcol - 1; /* * Correct oap->end.col and oap->start.col to be the * upper-left and lower-right corner of the block area. @@ -1735,13 +1744,22 @@ do_pending_operator(cap, old_col, gui_yank) */ resel_VIsual_mode = VIsual_mode; if (curwin->w_curswant == MAXCOL) - resel_VIsual_col = MAXCOL; - else if (VIsual_mode == Ctrl_V) - resel_VIsual_col = oap->end_vcol - oap->start_vcol + 1; - else if (oap->line_count > 1) - resel_VIsual_col = oap->end.col; + resel_VIsual_vcol = MAXCOL; else - resel_VIsual_col = oap->end.col - oap->start.col + 1; + { + if (VIsual_mode != Ctrl_V) + getvvcol(curwin, &(oap->end), + NULL, NULL, &oap->end_vcol); + if (VIsual_mode == Ctrl_V || oap->line_count <= 1) + { + if (VIsual_mode != Ctrl_V) + getvvcol(curwin, &(oap->start), + &oap->start_vcol, NULL, NULL); + resel_VIsual_vcol = oap->end_vcol - oap->start_vcol + 1; + } + else + resel_VIsual_vcol = oap->end_vcol; + } resel_VIsual_line_count = oap->line_count; } @@ -1769,7 +1787,7 @@ do_pending_operator(cap, old_col, gui_yank) if (!redo_VIsual_busy) { redo_VIsual_mode = resel_VIsual_mode; - redo_VIsual_col = resel_VIsual_col; + redo_VIsual_vcol = resel_VIsual_vcol; redo_VIsual_line_count = resel_VIsual_line_count; redo_VIsual_count = cap->count0; } @@ -7631,12 +7649,16 @@ nv_visual(cap) if (VIsual_mode == 'v') { if (resel_VIsual_line_count <= 1) - curwin->w_cursor.col += resel_VIsual_col * cap->count0 - 1; + { + validate_virtcol(); + curwin->w_curswant = curwin->w_virtcol + + resel_VIsual_vcol * cap->count0 - 1; + } else - curwin->w_cursor.col = resel_VIsual_col; - check_cursor_col(); + curwin->w_curswant = resel_VIsual_vcol; + coladvance(curwin->w_curswant); } - if (resel_VIsual_col == MAXCOL) + if (resel_VIsual_vcol == MAXCOL) { curwin->w_curswant = MAXCOL; coladvance((colnr_T)MAXCOL); @@ -7645,7 +7667,7 @@ nv_visual(cap) { validate_virtcol(); curwin->w_curswant = curwin->w_virtcol - + resel_VIsual_col * cap->count0 - 1; + + resel_VIsual_vcol * cap->count0 - 1; coladvance(curwin->w_curswant); } else diff --git a/src/version.c b/src/version.c index 756c6366cd..c9d6e24f47 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 333, /**/ 332, /**/ From 7d66bb5e2a40a9733b4747de24beab7fc63ffc53 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 4 Oct 2011 21:22:44 +0200 Subject: [PATCH 23/23] Added tag v7-3-333 for changeset 992b24149a9e --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 20804d5759..e85f9e97d5 100644 --- a/.hgtags +++ b/.hgtags @@ -1667,3 +1667,4 @@ ec901ddc84d5c66c5d0c1dcca093584598487f9f v7-3-329 abb03be99d661455fd3790cd25355459448fa432 v7-3-330 4b8c614c1c914ce5d712368a75dbfea9b7e44e17 v7-3-331 0ecfe54a273f6bc440684aca4ebe5926a2dfc6e2 v7-3-332 +992b24149a9ee0d6f417e40a7462891a9f62ec6a v7-3-333