]> granicus.if.org Git - vim/commitdiff
updated for version 7.0077
authorBram Moolenaar <Bram@vim.org>
Tue, 31 May 2005 22:14:58 +0000 (22:14 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 31 May 2005 22:14:58 +0000 (22:14 +0000)
14 files changed:
runtime/doc/change.txt
runtime/doc/eval.txt
runtime/doc/options.txt
runtime/doc/tags
src/charset.c
src/ex_eval.c
src/gui_w32.c
src/if_cscope.c
src/misc2.c
src/testdir/Make_amiga.mak
src/testdir/Make_dos.mak
src/testdir/test55.ok
src/testdir/test57.in [new file with mode: 0644]
src/version.h

index 01640542817130968e62eecd28c7052ebbed678a..a6eed40155173fa2403b1d21d0a8e3db36d667e0 100644 (file)
@@ -1,4 +1,4 @@
-*change.txt*    For Vim version 7.0aa.  Last change: 2005 May 22
+*change.txt*    For Vim version 7.0aa.  Last change: 2005 May 31
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1494,8 +1494,20 @@ found here: |sort()|.
 
                        With [i] case is ignored.
 
+                       With [n] sorting is done on the first decimal number
+                       in the line (after a {pattern} match).
+
+                       With [x] sorting is done on the first hexadecimal
+                       number in the line (after a {pattern} match).  A
+                       leading "0x" or "0X" is ignored.
+
+                       With [o] sorting is done on the first octal number in
+                       the line (after a {pattern} match).
+
                        With [u] only keep the first of a sequence of
                        identical lines (ignoring case when [i] is used).
+                       Note that leading and trailing white space may cause
+                       lines to be different.
 
                        When /{pattern}/ is specified the text matched with
                        {pattern} is skipped, so that you sort on what comes
@@ -1509,5 +1521,7 @@ found here: |sort()|.
                        ignoring the difference between tabs and spaces): >
                                :sort /.*\%10v/
 <
+Note that using ":sort" with ":global" doesn't sort the matching lines, it's
+quite useless.
 
  vim:tw=78:ts=8:ft=help:norl:
index 9c3f0af45ae70d36ace4ed7417798047e1332df8..f86bb1b9d8adef623eae8d9a1f2a79a631a1fe35 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2005 May 22
+*eval.txt*      For Vim version 7.0aa.  Last change: 2005 May 31
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -3743,6 +3743,8 @@ split({expr} [, {pattern} [, {keepempty}]])                       *split()*
                removing the matched characters.
                When the first or last item is empty it is omitted, unless the
                {keepempty} argument is given and it's non-zero.
+               Other empty items are kept when {pattern} matches at least one
+               character or when {keepempty} is non-zero.
                Example: >
                        :let words = split(getline('.'), '\W\+')
 <              To split a string in individual characters: >
index a3f7ca489e9c1bac68f9f249e2c6d75361a3e273..c61f6b56fbf8dc8452d640bd1c77d1fd8bcf3adf 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 7.0aa.  Last change: 2005 Apr 14
+*options.txt*  For Vim version 7.0aa.  Last change: 2005 May 31
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -6536,6 +6536,21 @@ A jump table for the options with a short description can be found at |Q_op|.
        This option can also be set with the "-V" argument.  See |-V|.
        This option is also set by the |:verbose| command.
 
+       When the 'verbosefile' option is set then the verbose messages are not
+       displayed.
+
+                                               *'verbosefile'* *'vfile'*
+'verbosefile' 'vfile'  string  (default empty)
+                       global
+                       {not in Vi}
+       When not empty all messages are written in a file with this name.
+       When the file exists messages are appended.
+       Writing to the file ends when Vim exits or when 'verbosefile' is made
+       empty.
+       Setting 'verbosefile' to a new value is like making it empty first.
+       The difference with |:redir| is that verbose messages are not
+       displayed when 'verbosefile' is set.
+
                                                *'viewdir'* *'vdir'*
 'viewdir' 'vdir'       string  (default for Amiga, MS-DOS, OS/2 and Win32:
                                                         "$VIM/vimfiles/view",
index a6a4dc084690b8da8c58ed46fb3c5624e406a807..81311a5e93f058623fdd44944d08408582026fce 100644 (file)
@@ -937,6 +937,8 @@ $VIMRUNTIME starting.txt    /*$VIMRUNTIME*
 'vdir' options.txt     /*'vdir'*
 've'   options.txt     /*'ve'*
 'verbose'      options.txt     /*'verbose'*
+'verbosefile'  options.txt     /*'verbosefile'*
+'vfile'        options.txt     /*'vfile'*
 'vi'   options.txt     /*'vi'*
 'viewdir'      options.txt     /*'viewdir'*
 'viewoptions'  options.txt     /*'viewoptions'*
@@ -5119,6 +5121,7 @@ hebrew    hebrew.txt      /*hebrew*
 hebrew.txt     hebrew.txt      /*hebrew.txt*
 help   various.txt     /*help*
 help-context   help.txt        /*help-context*
+help-tags      tags    1
 help-translated        various.txt     /*help-translated*
 help-xterm-window      various.txt     /*help-xterm-window*
 help.txt       help.txt        /*help.txt*
index c05a83d26a5c845db186149cf5d727032220801e..25680f677d769a57fd14f9303adb00499a943466 100644 (file)
@@ -1829,7 +1829,7 @@ skipwhite(p)
 }
 
 /*
- * skipdigits: skip over digits;
+ * skip over digits
  */
     char_u *
 skipdigits(p)
@@ -1840,6 +1840,32 @@ skipdigits(p)
     return p;
 }
 
+#if defined(FEAT_EX_EXTRA) || defined(PROTO)
+/*
+ * skip to digit (or NUL after the string)
+ */
+    char_u *
+skiptodigit(p)
+    char_u     *p;
+{
+    while (*p != NUL && !VIM_ISDIGIT(*p))      /* skip to next digit */
+       ++p;
+    return p;
+}
+
+/*
+ * skip to hex character (or NUL after the string)
+ */
+    char_u *
+skiptohex(p)
+    char_u     *p;
+{
+    while (*p != NUL && !vim_isxdigit(*p))     /* skip to next digit */
+       ++p;
+    return p;
+}
+#endif
+
 /*
  * Variant of isdigit() that can handle characters > 0x100.
  * We don't use isdigit() here, because on some systems it also considers
@@ -1942,6 +1968,10 @@ vim_isblankline(lbuf)
  * If "len" is not NULL, the length of the number in characters is returned.
  * If "nptr" is not NULL, the signed result is returned in it.
  * If "unptr" is not NULL, the unsigned result is returned in it.
+ * If "dooct" is non-zero recognize octal numbers, when > 1 always assume
+ * octal number.
+ * If "dohext" is non-zero recognize hex numbers, when > 1 always assume
+ * hex number.
  */
     void
 vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr)
@@ -1995,25 +2025,22 @@ vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr)
     /*
      * Do the string-to-numeric conversion "manually" to avoid sscanf quirks.
      */
-    if (hex)
+    if (hex == '0' || dooct > 1)
     {
-       if (hex == '0')
+       /* octal */
+       while ('0' <= *ptr && *ptr <= '7')
        {
-           /* octal */
-           while ('0' <= *ptr && *ptr <= '7')
-           {
-               un = 8 * un + (unsigned long)(*ptr - '0');
-               ++ptr;
-           }
+           un = 8 * un + (unsigned long)(*ptr - '0');
+           ++ptr;
        }
-       else
+    }
+    else if (hex != 0 || dohex > 1)
+    {
+       /* hex */
+       while (vim_isxdigit(*ptr))
        {
-           /* hex */
-           while (vim_isxdigit(*ptr))
-           {
-               un = 16 * un + (unsigned long)hex2nr(*ptr);
-               ++ptr;
-           }
+           un = 16 * un + (unsigned long)hex2nr(*ptr);
+           ++ptr;
        }
     }
     else
index d6c4ebee784b96f1d48d3298dbea2daeebb4295e..485721b9c83c9972adc035f204d6cd4748c4d44c 100644 (file)
@@ -523,14 +523,22 @@ throw_exception(value, type, cmdname)
 
        if (debug_break_level > 0)
            msg_silent = FALSE;         /* display messages */
+       else
+           verbose_enter();
        ++no_wait_return;
-       msg_scroll = TRUE;          /* always scroll up, don't overwrite */
+       if (debug_break_level > 0 || *p_vfile == NUL)
+           msg_scroll = TRUE;      /* always scroll up, don't overwrite */
+
        smsg((char_u *)_("Exception thrown: %s"), excp->value);
        msg_puts((char_u *)"\n");   /* don't overwrite this either */
-       cmdline_row = msg_row;
+
+       if (debug_break_level > 0 || *p_vfile == NUL)
+           cmdline_row = msg_row;
        --no_wait_return;
        if (debug_break_level > 0)
            msg_silent = save_msg_silent;
+       else
+           verbose_leave();
     }
 
     current_exception = excp;
@@ -569,17 +577,23 @@ discard_exception(excp, was_finished)
        saved_IObuff = vim_strsave(IObuff);
        if (debug_break_level > 0)
            msg_silent = FALSE;         /* display messages */
+       else
+           verbose_enter();
        ++no_wait_return;
-       msg_scroll = TRUE;          /* always scroll up, don't overwrite */
+       if (debug_break_level > 0 || *p_vfile == NUL)
+           msg_scroll = TRUE;      /* always scroll up, don't overwrite */
        smsg(was_finished
                    ? (char_u *)_("Exception finished: %s")
                    : (char_u *)_("Exception discarded: %s"),
                excp->value);
        msg_puts((char_u *)"\n");   /* don't overwrite this either */
-       cmdline_row = msg_row;
+       if (debug_break_level > 0 || *p_vfile == NUL)
+           cmdline_row = msg_row;
        --no_wait_return;
        if (debug_break_level > 0)
            msg_silent = save_msg_silent;
+       else
+           verbose_leave();
        STRCPY(IObuff, saved_IObuff);
        vim_free(saved_IObuff);
     }
@@ -632,14 +646,22 @@ catch_exception(excp)
 
        if (debug_break_level > 0)
            msg_silent = FALSE;         /* display messages */
+       else
+           verbose_enter();
        ++no_wait_return;
-       msg_scroll = TRUE;          /* always scroll up, don't overwrite */
+       if (debug_break_level > 0 || *p_vfile == NUL)
+           msg_scroll = TRUE;      /* always scroll up, don't overwrite */
+
        smsg((char_u *)_("Exception caught: %s"), excp->value);
        msg_puts((char_u *)"\n");   /* don't overwrite this either */
-       cmdline_row = msg_row;
+
+       if (debug_break_level > 0 || *p_vfile == NUL)
+           cmdline_row = msg_row;
        --no_wait_return;
        if (debug_break_level > 0)
            msg_silent = save_msg_silent;
+       else
+           verbose_leave();
     }
 }
 
@@ -785,7 +807,13 @@ report_make_pending(pending, value)
     void       *value;
 {
     if (p_verbose >= 14 || debug_break_level > 0)
+    {
+       if (debug_break_level <= 0)
+           verbose_enter();
        report_pending(RP_MAKE, pending, value);
+       if (debug_break_level <= 0)
+           verbose_leave();
+    }
 }
 
 /*
@@ -798,7 +826,13 @@ report_resume_pending(pending, value)
     void       *value;
 {
     if (p_verbose >= 14 || debug_break_level > 0)
+    {
+       if (debug_break_level <= 0)
+           verbose_enter();
        report_pending(RP_RESUME, pending, value);
+       if (debug_break_level <= 0)
+           verbose_leave();
+    }
 }
 
 /*
@@ -811,7 +845,13 @@ report_discard_pending(pending, value)
     void       *value;
 {
     if (p_verbose >= 14 || debug_break_level > 0)
+    {
+       if (debug_break_level <= 0)
+           verbose_enter();
        report_pending(RP_DISCARD, pending, value);
+       if (debug_break_level <= 0)
+           verbose_leave();
+    }
 }
 
 
index e83ff40602213aba03e284a257ec6def964b36d1..8d0a4cef0016074a67937bd02179eeb1450f9a87 100644 (file)
@@ -3966,6 +3966,7 @@ gui_mch_destroy_sign(sign)
        vim_free(sign);
     }
 }
+#endif
 
 #if defined(FEAT_BEVAL) || defined(PROTO)
 
@@ -4231,5 +4232,3 @@ netbeans_draw_multisign_indicator(int row)
     SetPixel(s_hdc, x+2, y, gui.currFgColor);
 }
 #endif
-
-#endif
index 1b0771337ab0ecceacb44fff64ddebc8adf31615..9693f845d3e540c1094c65f3de9b7e03e55fb383 100644 (file)
@@ -1130,7 +1130,7 @@ cs_find_common(opt, pat, forceit, verbose)
        if (matches == NULL)
            return FALSE;
 
-       (void)cs_manage_matches(matches, contexts, totmatches, Store);
+       (void)cs_manage_matches(matches, contexts, matched, Store);
 
        return do_tag((char_u *)pat, DT_CSCOPE, 0, forceit, verbose);
     }
@@ -1693,8 +1693,8 @@ cs_file_results(f, nummatches_a)
 
        for (j = 0; j < nummatches_a[i]; j++)
        {
-          if ((fullname=cs_parse_results(i, buf, CSREAD_BUFSIZE, &cntx,
-                          &slno, &search))==NULL)
+          if ((fullname = cs_parse_results(i, buf, CSREAD_BUFSIZE, &cntx,
+                          &slno, &search)) == NULL)
               continue;
 
           context = (char *)alloc(strlen(cntx)+5);
index 879384a6d8bbafe242d0363a966bba1fa2dcc7ed..a1e8c1272560f959fe2894cb940fa112544805e6 100644 (file)
@@ -2606,10 +2606,12 @@ call_shell(cmd, opt)
 
     if (p_verbose > 3)
     {
+       verbose_enter();
        smsg((char_u *)_("Calling shell to execute: \"%s\""),
                                                    cmd == NULL ? p_sh : cmd);
        out_char('\n');
        cursor_on();
+       verbose_leave();
     }
 
 #ifdef FEAT_PROFILE
@@ -4059,13 +4061,12 @@ vim_findfile(search_ctx)
 #ifdef FF_VERBOSE
                if (p_verbose >= 5)
                {
-                   /* always scroll up, don't overwrite */
-                   msg_scroll = TRUE;
+                   verbose_enter_scroll();
                    smsg((char_u *)"Already Searched: %s (%s)",
                                           ctx->ffs_fix_path, ctx->ffs_wc_path);
                    /* don't overwrite this either */
                    msg_puts((char_u *)"\n");
-                   cmdline_row = msg_row;
+                   verbose_leave_scroll();
                }
 #endif
                ff_free_stack_element(ctx);
@@ -4074,13 +4075,12 @@ vim_findfile(search_ctx)
 #ifdef FF_VERBOSE
            else if (p_verbose >= 5)
            {
-               /* always scroll up, don't overwrite */
-               msg_scroll = TRUE;
+               verbose_enter_scroll();
                smsg((char_u *)"Searching: %s (%s)",
                                         ctx->ffs_fix_path, ctx->ffs_wc_path);
                /* don't overwrite this either */
                msg_puts((char_u *)"\n");
-               cmdline_row = msg_row;
+               verbose_leave_scroll();
            }
 #endif
 
@@ -4264,13 +4264,12 @@ vim_findfile(search_ctx)
                                {
                                    if (p_verbose >= 5)
                                    {
-                                       /* always scroll up, don't overwrite */
-                                       msg_scroll = TRUE;
+                                       verbose_enter_scroll();
                                        smsg((char_u *)"Already: %s",
                                                                   file_path);
                                        /* don't overwrite this either */
                                        msg_puts((char_u *)"\n");
-                                       cmdline_row = msg_row;
+                                       verbose_leave_scroll();
                                    }
                                    continue;
                                }
@@ -4293,12 +4292,11 @@ vim_findfile(search_ctx)
 #ifdef FF_VERBOSE
                                if (p_verbose >= 5)
                                {
-                                   /* always scroll up, don't overwrite */
-                                   msg_scroll = TRUE;
+                                   verbose_enter_scroll();
                                    smsg((char_u *)"HIT: %s", file_path);
                                    /* don't overwrite this either */
                                    msg_puts((char_u *)"\n");
-                                   cmdline_row = msg_row;
+                                   verbose_leave_scroll();
                                }
 #endif
                                return file_path;
@@ -4483,13 +4481,12 @@ ff_get_visited_list(filename, list_headp)
 #ifdef FF_VERBOSE
                if (p_verbose >= 5)
                {
-                   /* always scroll up, don't overwrite */
-                   msg_scroll = TRUE;
+                   verbose_enter_scroll();
                    smsg((char_u *)"ff_get_visited_list: FOUND list for %s",
                                                                    filename);
                    /* don't overwrite this either */
                    msg_puts((char_u *)"\n");
-                   cmdline_row = msg_row;
+                   verbose_leave_scroll();
                }
 #endif
                return retptr;
@@ -4501,12 +4498,11 @@ ff_get_visited_list(filename, list_headp)
 #ifdef FF_VERBOSE
     if (p_verbose >= 5)
     {
-       /* always scroll up, don't overwrite */
-       msg_scroll = TRUE;
+       verbose_enter_scroll();
        smsg((char_u *)"ff_get_visited_list: new list for %s", filename);
        /* don't overwrite this either */
        msg_puts((char_u *)"\n");
-       cmdline_row = msg_row;
+       verbose_leave_scroll();
     }
 #endif
 
index b6d9350422569052228af8ef5ea74b48aff2fb2c..cfe2134737b91a60e0de537db04c48b644eb951a 100644 (file)
@@ -24,7 +24,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test38.out test39.out test40.out test41.out test42.out \
                test43.out test44.out test45.out test46.out test47.out \
                test48.out test51.out test53.out test54.out test55.out \
-               test56.out
+               test56.out test57.out
 
 .SUFFIXES: .in .out
 
@@ -100,3 +100,4 @@ test53.out: test53.in
 test54.out: test54.in
 test55.out: test55.in
 test56.out: test56.in
+test57.out: test57.in
index f8816ec704dc0e7de5305b85846a20f581062f41..6ca1acc3300582315a69a9be4237a64beefe2699 100644 (file)
@@ -18,7 +18,7 @@ SCRIPTS16 =   test1.out test19.out test20.out test22.out \
                test35.out test36.out test43.out \
                test44.out test45.out test46.out test47.out \
                test48.out test51.out test53.out test54.out \
-               test55.out test56.out
+               test55.out test56.out test57.out
 
 SCRIPTS =      test3.out test4.out test5.out test6.out test7.out \
                test8.out test9.out test11.out test13.out test14.out \
index 438a9f2ed68532dede64701ba0db5b1551bf4efd..caec674bd660066f21a11c5ce55cef70ca40a1d8 100644 (file)
@@ -83,3 +83,5 @@ caught a:000[3]
 ['aa', '', 'bb']
 ['', 'aa', '', 'bb', '']
 ['aa', '', 'bb', 'cc', '']
+['a', 'b', 'c']
+['', 'a', '', 'b', '', 'c', '']
diff --git a/src/testdir/test57.in b/src/testdir/test57.in
new file mode 100644 (file)
index 0000000..7e70169
--- /dev/null
@@ -0,0 +1,52 @@
+Tests for :sort command.     vim: set ft=vim :
+
+STARTTEST
+:so small.vim
+:"
+:/^t1:/+1,/^t2/-1sort
+:/^t2:/+1,/^t3/-1sort u
+:/^t3:/+1,/^t4/-1sort u /[^:]*:/
+:/^t4:/+1,/^t5/-1sort n
+:/^t5:/+1,/^t6/-1sort n -[^:]*:-
+:/^t6:/+1,/^t7/-1sort o
+:/^t7:/+1,/^t8/-1sort x ,.*/,
+:/^t8:/+1,/^t9/-1sort n o
+:/^t1:/,$wq! test.out
+ENDTEST
+
+t1: alphabetical
+two test
+One test
+one test
+Two test
+t2: alpha, unique
+One test
+one test
+Two test
+one test
+Two test 
+t3: alpha, unique, skip pattern
+one: xay
+two: aaa
+another: tuvy
+t4: number
+asdf 83 asd
+one 333   
+xce   9
+t5: number and skip
+asdf 3 a: sd 11
+one 33:4   99
+:9 
+t6: octal
+2389
+111
+asdf 0014
+t7: hex and skip
+sf/0x1d3
+0x44/1a1
+asd/ad 1413
+t8: wrong arguments
+ccc
+bbb
+aaa
+t8:
index ba96d655cad93767a07592578eb076dc581cd67c..995acf4499d311e33b2a222cf22b7a5ca34d630f 100644 (file)
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT      "vim70aa"
 #define VIM_VERSION_SHORT      "7.0aa"
 #define VIM_VERSION_MEDIUM     "7.0aa ALPHA"
-#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2005 May 27)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2005 May 27, compiled "
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2005 May 31)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2005 May 31, compiled "