# HG changeset patch # User vimboss # Date 1137972612 0 # Node ID 8a5a95f7ef2a7dfeb585d0392489fb57ea4c5af9 # Parent c79d4df4686ed44d408d97f2b10e9f0876bacc7b updated for version 7.0185 diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.0aa. Last change: 2006 Jan 05 +*pattern.txt* For Vim version 7.0aa. Last change: 2006 Jan 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -394,7 +394,9 @@ More explanation and examples below, fol |/\ze| \ze \ze anything, sets end of match |/\%^| \%^ \%^ beginning of file |/zero-width| *E71* |/\%$| \%$ \%$ end of file |/zero-width| +|/\%V| \%V \%V inside Visual area |/zero-width| |/\%#| \%# \%# cursor position |/zero-width| +|/\%'m| \%'m \%'m mark m position |/zero-width| |/\%l| \%23l \%23l in line 23 |/zero-width| |/\%c| \%23c \%23c in column 23 |/zero-width| |/\%v| \%23v \%23v in virtual column 23 |/zero-width| @@ -788,6 +790,11 @@ An ordinary atom can be: position after the first "VIM". Searching from the end of the file backwards is easier! + */\%V* +\%V Match inside the Visual area. When Visual mode has already been + stopped match in the area that |gv| would reselect. + Only works for the current buffer. + */\%#* *cursor-position* \%# Matches with the cursor position. Only works when matching in a buffer displayed in a window. {not in Vi} @@ -802,6 +809,20 @@ An ordinary atom can be: < When 'hlsearch' is set and you move the cursor around and make changes this will clearly show when the match is updated or not. + */\%'m* */\%<'m* */\%>'m* +\%'m Matches with the position of mark m. +\%<'m Matches before the position of mark m. +\%>'m Matches after the position of mark m. + Example, to highlight the text from mark 's to 'e: > + /.\%>'s.*\%<'e.. +< Note that two dots are required to include mark 'e in the match. That + is because "\%<'e" matches at the character before the 'e mark, and + since it's a |/zero-width| match it doesn't include that character. + {not in Vi} + WARNING: When the mark is moved after the pattern was used, the result + becomes invalid. Vim doesn't automatically update the matches. + Similar to moving the cursor for |\%#|. + */\%l* */\%>l* */\%l| and |/\%c|. (Benji Fisher) - -Win32 installer: Default _vimrc contains absolute path to diff.exe. After -upgrading it becomes invalid. Fix it automatically somehow? Use $VIMRUNTIME -in the path instead of filling it the path? At least give a clear error -message. - -In diff mode deleting lines is very slow. E.g., when diffing two .po files -and then sourcing po/cleaup.vim. - 7 Add plugins for formatting. Should be able to make a choice depending on the language of a file (English/Korean/Japanese/etc.). Setting the 'langformat' option to "chinese" would load the @@ -139,8 +118,8 @@ Mac unicode patch (Da Woon Jung): Patch to add a few flags to search(). (Benji Fisher, Nov 29, doc update Dec 1) Also add search???() function that returns list with lnum and col. -Win32: Use the free downloadable compiler 7.1. Figure out how to do debugging -(with Agide?) and describe it. (George Reilly) +Win32: Use the free downloadable compiler 7.1 (2003). Figure out how to do +debugging (with Agide?) and describe it. (George Reilly) Try out using the free MS compiler and debugger, using Make_mvc.mak. Try using Visual C++ Express 2005. (Ilya Bobir Dec 20) Disadvantage: Annoying warning messages, requires ..._NO_DEPRECATE, this @@ -1445,6 +1424,10 @@ 7 Add the arguments for configure to t 7 When Vim detects a file is being edited elsewhere and it's a gvim session of the same user it should offer a "Raise" button, so that the other gvim window can be displayed. (Eduard) +8 Support saving and restoring session for X windows? It should work to do + ":mksession" and use "-S fname" for the restart command. The + gui_x11_wm_protocol_handler() already takes care of the rest. + global_event_filter() for GTK. Spell checking: diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 21 +*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -550,9 +550,15 @@ New items in search patterns: ~ |/\%U| \%U1234abcd search for character with 8 pos. hex number |/\]| [\U1234abcd] idem, in a colletion (The above partly by Ciaran McCreesh) + |/[[=| [[=a=]] an equivalence class (only for latin1 characters) |/[[.| [[.a.]] a collation element (only works with single char) +|/\%'m| \%'m match at mark m +|/\%<'m| \%<'m match before mark m +|/\%>'m| \%>'m match after mark m +|/\%V| \%V match in Visual area + Nesting |/multi| items no longer is an error when an empty match is possible. It is now possible to use \{0}, it matches the preceding atom zero times. Not @@ -1599,4 +1605,7 @@ the quickfix window to leave an unlisted Win32: when using two screens of different size, setting 'lines' to a large value didn't fill the whole screen. (SungHyun Nam) +Win32 installer: The generated _vimrc contained an absolute path to diff.exe. +After upgrading it becomes invalid. Now use $VIMRUNTIME instead. + vim:tw=78:ts=8:ft=help:norl: diff --git a/src/dosinst.c b/src/dosinst.c --- a/src/dosinst.c +++ b/src/dosinst.c @@ -1194,24 +1194,25 @@ install_vimrc(int idx) fprintf(fd, " if arg2 =~ ' ' | let arg2 = '\"' . arg2 . '\"' | endif\n"); fprintf(fd, " let arg3 = v:fname_out\n"); fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n"); - p = strchr(installdir, ' '); - if (p != NULL) - { - /* The path has a space. When using cmd.exe (Win NT/2000/XP) put - * quotes around the whole command and around the diff command. - * Otherwise put a double quote just before the space and at the - * end of the command. Putting quotes around the whole thing - * doesn't work on Win 95/98/ME. This is mostly guessed! */ - fprintf(fd, " if &sh =~ '\\ ' . arg3 . '\"'\n", installdir); - fprintf(fd, " else\n"); - *p = NUL; - fprintf(fd, " silent execute '!%s\" %s\\diff\" ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n", installdir, p + 1); - *p = ' '; - fprintf(fd, " endif\n"); - } - else - fprintf(fd, " silent execute '!%s\\diff ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n", installdir); + + /* If the path has a space: When using cmd.exe (Win NT/2000/XP) put + * quotes around the whole command and around the diff command. + * Otherwise put a double quote just before the space and at the + * end of the command. Putting quotes around the whole thing + * doesn't work on Win 95/98/ME. This is mostly guessed! */ + fprintf(fd, " let eq = ''\n"); + fprintf(fd, " if $VIMRUNTIME =~ ' '\n"); + fprintf(fd, " if &sh =~ '\\ ' . arg3 . eq\n"); + fprintf(fd, "endfunction\n"); fprintf(fd, "\n"); } diff --git a/src/globals.h b/src/globals.h --- a/src/globals.h +++ b/src/globals.h @@ -398,6 +398,7 @@ EXTERN int drag_sep_line INIT(= FALSE); #ifdef FEAT_DIFF /* Value set from 'diffopt'. */ EXTERN int diff_context INIT(= 6); /* context for folds */ +EXTERN int diff_need_scrollbind INIT(= FALSE); #endif #ifdef FEAT_MENU diff --git a/src/gui_beval.c b/src/gui_beval.c --- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -28,7 +28,9 @@ general_beval_cb(beval, state) char_u *text; static char_u *result = NULL; long winnr = 0; +#ifdef FEAT_WINDOWS win_T *cw; +#endif /* Don't do anything when 'ballooneval' is off, messages scrolled the @@ -40,9 +42,11 @@ general_beval_cb(beval, state) if (*p_bexpr != NUL && get_beval_info(balloonEval, TRUE, &wp, &lnum, &text, &col) == OK) { +# ifdef FEAT_WINDOWS /* Convert window pointer to number. */ for (cw = firstwin; cw != wp; cw = cw->w_next) ++winnr; +# endif set_vim_var_nr(VV_BEVAL_BUFNR, (long)wp->w_buffer->b_fnum); set_vim_var_nr(VV_BEVAL_WINNR, winnr); @@ -293,7 +297,11 @@ get_beval_info(beval, getword, winp, lnu *textp = NULL; row = Y_2_ROW(beval->y); col = X_2_COL(beval->x); +#ifdef FEAT_WINDOWS wp = mouse_find_win(&row, &col); +#else + wp = firstwin; +#endif if (wp != NULL && row < wp->w_height && col < W_WIDTH(wp)) { /* Found a window and the cursor is in the text. Now find the line diff --git a/src/main.c b/src/main.c --- a/src/main.c +++ b/src/main.c @@ -988,6 +988,15 @@ main_loop(cmdwin, noexmode) skip_redraw = FALSE; else if (do_redraw || stuff_empty()) { +#if defined(FEAT_DIFF) && defined(FEAT_SCROLLBIND) + /* Scroll-binding for diff mode may have been postponed until + * here. Avoids doing it for every change. */ + if (diff_need_scrollbind) + { + check_scrollbind((linenr_T)0, 0L); + diff_need_scrollbind = FALSE; + } +#endif #if defined(FEAT_FOLDING) && defined(FEAT_VISUAL) /* Include a closed fold completely in the Visual area. */ foldAdjustVisual(); @@ -1153,9 +1162,14 @@ getout(exitval) buf->b_changedtick = -1; /* note that we did it already */ wp = firstwin; /* restart, window may be closed */ } +# ifdef FEAT_WINDOWS else wp = wp->w_next; +# else + break; +# endif } + /* Trigger BufUnload for buffers that are loaded */ for (buf = firstbuf; buf != NULL; buf = buf->b_next) if (buf->b_ml.ml_mfp != NULL) diff --git a/src/po/cleanup.vim b/src/po/cleanup.vim --- a/src/po/cleanup.vim +++ b/src/po/cleanup.vim @@ -3,6 +3,7 @@ " - Comment-out fuzzy and empty messages. " - Make sure there is a space before the string (required for Solaris). " Requires Vim 6.0 or later (because of multi-line search patterns). +diffoff! silent g/^#: /d silent g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ / silent g/^msgstr"/s//msgstr "/ diff --git a/src/syntax.c b/src/syntax.c --- a/src/syntax.c +++ b/src/syntax.c @@ -2974,8 +2974,11 @@ syn_add_end_off(result, regmatch, spp, i else { /* Don't go past the end of the line. Matters for "rs=e+2" when there - * is a matchgroup. */ - len = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); + * is a matchgroup. Watch out for match with last NL in the buffer. */ + if (result->lnum > syn_buf->b_ml.ml_line_count) + len = 0; + else + len = STRLEN(ml_get_buf(syn_buf, result->lnum, FALSE)); if (col > len) result->col = len; else