]> granicus.if.org Git - vim/commitdiff
updated for version 7.0185 v7.0185
authorBram Moolenaar <Bram@vim.org>
Sun, 22 Jan 2006 23:30:12 +0000 (23:30 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 22 Jan 2006 23:30:12 +0000 (23:30 +0000)
runtime/doc/pattern.txt
runtime/doc/spell.txt
runtime/doc/todo.txt
runtime/doc/version7.txt
src/dosinst.c
src/globals.h
src/gui_beval.c
src/main.c
src/po/cleanup.vim
src/syntax.c

index 191a8d587c9c4b9d3d3ee4cd98db2d449f940f76..ca6431e1909bf6cebe990ba8c62c8ec838084c04 100644 (file)
@@ -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, follow the links.
 |/\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 @@ $  At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
        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 @@ $  At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
 <      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*
 \%23l  Matches in a specific line.
 \%<23l Matches above a specific line (lower line number).
index 56365c7ae04c7f52d7dd128c6085461eecd35121..6393565a965da1527c12d109d51dc3253e98b732 100644 (file)
@@ -1,4 +1,4 @@
-*spell.txt*    For Vim version 7.0aa.  Last change: 2006 Jan 13
+*spell.txt*    For Vim version 7.0aa.  Last change: 2006 Jan 22
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -995,16 +995,11 @@ word to start with an upper case letter.
 WORDS WITH A SLASH                                     *spell-SLASH*
 
 The slash is used in the .dic file to separate the basic word from the affix
-letters that can be used.  Unfortunately, this means you cannot use a slash in
-a word.  Thus "TCP/IP" cannot be a word.  To work around that you can define a
-replacement character for the slash.  Example:
-
-       SLASH , ~
-
-Now you can use "TCP,IP" to add the word "TCP/IP".
-
-Of course, the letter used should itself not appear in any word!  The letter
-must be ASCII, thus a single byte.
+letters and other flags.  Unfortunately, this means you cannot use a slash in
+a word.  Thus "TCP/IP" is not a word but "TCP with the flags "IP".  To include
+a slash in the word put a backslash before it: "TCP\/IP".  In the rare case
+you want to use a backslash inside a word you need to use two backslashes.
+Any other use of the backslash is reserved for future expansion.
 
 
 KEEP-CASE WORDS                                                *spell-KEEPCASE*
index 6785f76210a18ab176489fbbc6e71cd184bea19e..01f88e83ed7e9b063d618fda027915f827d9716f 100644 (file)
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Jan 20
+*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Jan 22
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -71,7 +71,6 @@ spelling:
 - Check out Hunspell 1.1.3.
     what does MAXNGRAMSUGS do?
     See announcement (Nemeth, 5 jan)
-    use "\/" instead of SLASH item?
     is COMPLEXPREFIXES necessary now that we have flags for affixes?
 - Look into hungarian dictionary:
   http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz
@@ -100,26 +99,6 @@ spelling:
   adding a bad word like "zw" would.  Use "zuw" to undo "zw"?  (Antonio
   Colombo)
 
-GTK: get an X error while exiting quickly after starting (running the tests).
-Caused by new GTK library?
-    X Error: BadWindow (invalid Window parameter) 3
-
-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.
-
-Is it easy to have an item in a pattern that matches with a mark location?
-Similar to |/\%>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 @@ User Friendlier:
 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:
index 8f71ee51717d9b5f26c6ff204ffff94216487cb7..0dcc713c9fe0bc43d0b392028dc812f5b2a256a6 100644 (file)
@@ -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 "No Name" buffer behind every time.
 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:
index efc6fdfee08c307abb8d69738ddb36fa73254642..41a826708cb261d9ddf76aa106cf3fbad836cc23 100644 (file)
@@ -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 =~ '\\<cmd'\n");
-           fprintf(fd, "    silent execute '!\"\"%s\\diff\" ' . opt . arg1 . ' ' . arg2 . ' > ' . 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 =~ '\\<cmd'\n");
+       fprintf(fd, "      let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n");
+       fprintf(fd, "      let eq = '\"'\n");
+       fprintf(fd, "    else\n");
+       fprintf(fd, "      let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
+       fprintf(fd, "    endif\n");
+       fprintf(fd, "  else\n");
+       fprintf(fd, "    let cmd = $VIMRUNTIME . '\\diff'\n");
+       fprintf(fd, "  endif\n");
+       fprintf(fd, "  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq\n");
+
        fprintf(fd, "endfunction\n");
        fprintf(fd, "\n");
     }
index b41c9e055446fac72c5bc1d53887830fa3146193..9fd9b668cc40f530cc132e0b4608c495162b5e91 100644 (file)
@@ -398,6 +398,7 @@ EXTERN int  drag_sep_line INIT(= FALSE);    /* dragging vert separator */
 #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
index 755f943100c1233f1f92e1e8b53eb60740c692da..bb26497fc6c16e85a35fc73359b834254062938f 100644 (file)
@@ -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, lnump, textp, colp)
     *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
index fd85ea89d75da0e72ae6318ca3411527705c6d81..561d6ae4bb08cce1748894c78dc847cabe8a1fdf 100644 (file)
@@ -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)
index 78d1e5afe8cdc3d5bc98863b9e0130654b1986a9..a4905c2edfabc41a21d4a4009a806ddcfa19d3d0 100644 (file)
@@ -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 "/
index 1c093a0be3f732c910c5b61e2779f8239855989b..ab9bcced83d3b5643c4c3470143e95d2ab7df3b2 100644 (file)
@@ -2974,8 +2974,11 @@ syn_add_end_off(result, regmatch, spp, idx, extra)
     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