From 4a83b853f938d46f353f539ae4c2074621dbc404 Mon Sep 17 00:00:00 2001 From: edyfox Date: Sun, 19 Aug 2007 12:48:01 +0000 Subject: [PATCH] Merged from the latest developing branch. git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@464 2a77ed30-b011-0410-a7ad-c7884a0aa172 --- merge.sh | 6 +++++ merge2.sh | 6 +++++ runtime/doc/pi_paren.txt | 4 +-- runtime/plugin/matchparen.vim | 9 ++++--- src/GvimExt/gvimext.cpp | 12 ++++----- src/ex_docmd.c | 59 ++++++++++++++++++++++++++++++------------- src/version.c | 6 +++++ 7 files changed, 73 insertions(+), 29 deletions(-) create mode 100755 merge.sh create mode 100755 merge2.sh diff --git a/merge.sh b/merge.sh new file mode 100755 index 00000000..cb149df2 --- /dev/null +++ b/merge.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +svn merge \ + https://vim.svn.sourceforge.net/svnroot/vim/trunk/ \ + https://vim.svn.sourceforge.net/svnroot/vim/branches/vim7.1 \ + . diff --git a/merge2.sh b/merge2.sh new file mode 100755 index 00000000..cb149df2 --- /dev/null +++ b/merge2.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +svn merge \ + https://vim.svn.sourceforge.net/svnroot/vim/trunk/ \ + https://vim.svn.sourceforge.net/svnroot/vim/branches/vim7.1 \ + . diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt index c83c8703..53239f74 100644 --- a/runtime/doc/pi_paren.txt +++ b/runtime/doc/pi_paren.txt @@ -12,8 +12,8 @@ This plugin is only available if 'compatible' is not set. You can avoid loading this plugin by setting the "loaded_matchparen" variable: > :let loaded_matchparen = 1 -The plugin installs CursorMoved autocommands to redefine the match -highlighting. +The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to +redefine the match highlighting. To disable the plugin after it was loaded use this command: > diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index d709c982..e12ff656 100644 --- a/runtime/plugin/matchparen.vim +++ b/runtime/plugin/matchparen.vim @@ -1,6 +1,6 @@ " Vim plugin for showing matching parens " Maintainer: Bram Moolenaar -" Last Change: 2007 Jul 30 +" Last Change: 2007 Aug 8 " Exit quickly when: " - this plugin was already loaded (or disabled) @@ -13,7 +13,7 @@ let g:loaded_matchparen = 1 augroup matchparen " Replace all matchparen autocommands - autocmd! CursorMoved,CursorMovedI * call s:Highlight_Matching_Pair() + autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair() augroup END " Skip the rest if it was already done. @@ -126,7 +126,8 @@ function! s:Highlight_Matching_Pair() endfunction " Define commands that will disable and enable the plugin. -command! NoMatchParen 3match none | unlet! g:loaded_matchparen | au! matchparen -command! DoMatchParen runtime plugin/matchparen.vim | doau CursorMoved +command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen | + \ au! matchparen +command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved let &cpo = cpo_save diff --git a/src/GvimExt/gvimext.cpp b/src/GvimExt/gvimext.cpp index a18eb0bb..aa99164b 100644 --- a/src/GvimExt/gvimext.cpp +++ b/src/GvimExt/gvimext.cpp @@ -69,14 +69,14 @@ getGvimName(char *name, int runtime) // Registry didn't work, use the search path. if (name[0] == 0) - strcpy(name, searchpath("gvim.exe")); + strcpy(name, searchpath((char *)"gvim.exe")); if (!runtime) { // Only when looking for the executable, not the runtime dir, we can // search for the batch file or a name without a path. if (name[0] == 0) - strcpy(name, searchpath("gvim.bat")); + strcpy(name, searchpath((char *)"gvim.bat")); if (name[0] == 0) strcpy(name, "gvim"); // finds gvim.bat or gvim.exe @@ -152,9 +152,9 @@ dyn_libintl_init(char *dir) FARPROC *ptr; } libintl_entry[] = { - {"gettext", (FARPROC*)&dyn_libintl_gettext}, - {"textdomain", (FARPROC*)&dyn_libintl_textdomain}, - {"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain}, + {(char *)"gettext", (FARPROC*)&dyn_libintl_gettext}, + {(char *)"textdomain", (FARPROC*)&dyn_libintl_textdomain}, + {(char *)"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain}, {NULL, NULL} }; @@ -835,7 +835,7 @@ searchpath(char *name) (LPTSTR)location) > (HINSTANCE)32) return location; } - return ""; + return (char *)""; } # endif #endif diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 5e637919..73a990c7 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3281,39 +3281,64 @@ set_one_cmd_context(xp, buff) if (ea.argt & XFILE) { - int in_quote = FALSE; - char_u *bow = NULL; /* Beginning of word */ + int c; + int in_quote = FALSE; + char_u *bow = NULL; /* Beginning of word */ /* * Allow spaces within back-quotes to count as part of the argument * being expanded. */ xp->xp_pattern = skipwhite(arg); - for (p = xp->xp_pattern; *p; ) + p = xp->xp_pattern; + while (*p != NUL) { - if (*p == '\\' && p[1] != NUL) +#ifdef FEAT_MBYTE + if (has_mbyte) + c = mb_ptr2char(p); + else +#endif + c = *p; + if (c == '\\' && p[1] != NUL) ++p; + else if (c == '`') + { + if (!in_quote) + { + xp->xp_pattern = p; + bow = p + 1; + } + in_quote = !in_quote; + } #ifdef SPACE_IN_FILENAME - else if (vim_iswhite(*p) && (!(ea.argt & NOSPC) || usefilter)) + else if (!vim_isfilec(c) && (!(ea.argt & NOSPC) || usefilter)) #else - else if (vim_iswhite(*p)) + else if (!vim_isfilec(c)) #endif { - p = skipwhite(p); + while (*p != NUL) + { +#ifdef FEAT_MBYTE + if (has_mbyte) + c = mb_ptr2char(p); + else +#endif + c = *p; + if (c == '`' || vim_isfilec(c)) + break; +#ifdef FEAT_MBYTE + if (has_mbyte) + len = (*mb_ptr2len)(p); + else +#endif + len = 1; + mb_ptr_adv(p); + } if (in_quote) bow = p; else xp->xp_pattern = p; - --p; - } - else if (*p == '`') - { - if (!in_quote) - { - xp->xp_pattern = p; - bow = p + 1; - } - in_quote = !in_quote; + p -= len; } mb_ptr_adv(p); } diff --git a/src/version.c b/src/version.c index 11d94435..a2830150 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,12 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 82, +/**/ + 81, +/**/ + 80, +/**/ 79, /**/ 78, -- 2.11.4.GIT