]> granicus.if.org Git - vim/commitdiff
updated for version 7.0213
authorBram Moolenaar <Bram@vim.org>
Fri, 3 Mar 2006 22:56:30 +0000 (22:56 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 3 Mar 2006 22:56:30 +0000 (22:56 +0000)
runtime/doc/eval.txt
runtime/doc/options.txt
runtime/doc/tags
src/edit.c
src/globals.h
src/option.c
src/screen.c
src/structs.h
src/version.h

index a35ebab6b9364e699034cf1383597ea14cbecb15..b2ca19944725f6dd9401da724a8ece9644517f72 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Mar 02
+*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Mar 03
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1845,9 +1845,13 @@ bufname({expr})                                          *bufname()*
                Obsolete name: buffer_name().
 
                                                        *bufnr()*
-bufnr({expr})  The result is the number of a buffer, as it is displayed by
+bufnr({expr} [, {create}])
+               The result is the number of a buffer, as it is displayed by
                the ":ls" command.  For the use of {expr}, see |bufname()|
-               above.  If the buffer doesn't exist, -1 is returned.
+               above.
+               If the buffer doesn't exist, -1 is returned.  Or, if the
+               {create} argument is present and not zero, a new, unlisted,
+               buffer is created and its number is returned.
                bufnr("$") is the last buffer: >
        :let last_buffer = bufnr("$")
 <              The result is a Number, which is the highest buffer number
@@ -2078,9 +2082,8 @@ cursor({list})
                Positions the cursor at the column {col} in the line {lnum}.
                The first column is one.
                When there is one argument {list} this is used as a |List|
-               with two or three items {lnum}, {col} and {off}.  This is
-               useful to move the cursor to a position obtained with
-               |getpos()|.
+               with two or three items {lnum}, {col} and {off}.  This is like
+               the return value of |getpos()|, but without the first item.
                Does not change the jumplist.
                If {lnum} is greater than the number of lines in the buffer,
                the cursor will be positioned at the last line in the buffer.
@@ -3241,7 +3244,7 @@ line({expr})      The result is a Number, which is the line number of the file
                            returned)
                    w0      first line visible in current window
                    w$      last line visible in current window
-               Note that only marks in the current file can be used.
+               Note that a mark in another file can be used.
                To get the column number use |col()|.  To get both use
                |getpos()|.
                Examples: >
@@ -3510,9 +3513,14 @@ nr2char({expr})                                          *nr2char()*
                string, thus results in an empty string.
 
                                                        *getpos()*
-getpos({expr}) The result is a |List| with three numbers: [lnum, col, off].
-               This is the file position given with {expr}.  For the accepted
-               positions see |line()|.
+getpos({expr}) Get the position for {expr}.  For possible values of {expr}
+               see |line()|.
+               The result is a |List| with four numbers:
+                   [bufnum, lnum, col, off]
+               "bufnum" is zero, unless a mark like '0 or 'A is used, then it
+               is the buffer number of the mark.
+               "lnum" and "col" are the position in the buffer.  The first
+               column is 1.
                The "off" number is zero, unless 'virtualedit' is used.  Then
                it is the offset in screen columns from the start of the
                character.  E.g., a position within a Tab or after the last
@@ -3520,7 +3528,8 @@ getpos({expr})    The result is a |List| with three numbers: [lnum, col, off].
                This can be used to save and restore the cursor position: >
                        let save_cursor = getpos(".")
                        MoveTheCursorAround
-                       call cursor(save_cursor)
+                       call setpos(save_cursor)
+<              Also see |setpos()|.
 
 prevnonblank({lnum})                                   *prevnonblank()*
                Return the line number of the first line at or above {lnum}
@@ -3846,13 +3855,14 @@ reverse({list}) Reverse the order of items in {list} in-place.  Returns
 search({pattern} [, {flags} [, {stopline}]])                   *search()*
                Search for regexp pattern {pattern}.  The search starts at the
                cursor position (you can use |cursor()| to set it).
+
                {flags} is a String, which can contain these character flags:
                'b'     search backward instead of forward
                'n'     do Not move the cursor
                'w'     wrap around the end of the file
                'W'     don't wrap around the end of the file
-               's'     set the ' mark at the previous location of the
-                       cursor.
+               's'     set the ' mark at the previous location of the cursor
+               'c'     accept a match at the cursor position
                If neither 'w' or 'W' is given, the 'wrapscan' option applies.
 
                If the 's' flag is supplied, the ' mark is set, only if the
@@ -3869,7 +3879,7 @@ search({pattern} [, {flags} [, {stopline}]])                      *search()*
 
                When a match has been found its line number is returned.
                The cursor will be positioned at the match, unless the 'n'
-               flag is used).
+               flag is used.
                If there is no match a 0 is returned and the cursor doesn't
                move.  No error message is given.
                To get the column number too use |searchpos()|.
@@ -3930,7 +3940,6 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip} [, {stopline}]]])
 <              By leaving {middle} empty the "else" is skipped.
 
                {flags} are used like with |search()|.  Additionally:
-               'n'     do Not move the cursor
                'r'     Repeat until no more matches found; will find the
                        outer pair
                'm'     return number of Matches instead of line number with
@@ -4083,6 +4092,32 @@ setloclist({nr}, {list} [, {action}])                    *setloclist()*
                invalid window number {nr}, -1 is returned.
                Otherwise, same as setqflist().
 
+                                                       *setpos()*
+setpos({expr}, {list})
+               Set the position for {expr}.  Possible values:
+                       .       the cursor
+                       'x      mark x
+
+               {list} must be a |List| with four numbers:
+                   [bufnum, lnum, col, off]
+
+               "bufnum" is the buffer number.  Zero can be used for the
+               current buffer.  Setting the cursor is only possible for 
+               the current buffer.  To set a mark in another buffer you can
+               use the |bufnr()| function to turn a file name into a buffer
+               number.
+
+               "lnum" and "col" are the position in the buffer.  The first
+               column is 1.  Use a zero "lnum" to delete a mark.
+
+               The "off" number is only used when 'virtualedit' is set. Then
+               it is the offset in screen columns from the start of the
+               character.  E.g., a position within a Tab or after the last
+               character.
+
+               Also see |getpos()|
+
+
 setqflist({list} [, {action}])                         *setqflist()*
                Create or replace or add to the quickfix list using the items
                in {list}.  Each item in {list} is a dictionary.
index 96292dc249c7a1e805d37518c5afb28f5e5d0759..43cc7cd7e0bd897f65d5099cf8a7487ff50f36ac 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 7.0aa.  Last change: 2006 Mar 02
+*options.txt*  For Vim version 7.0aa.  Last change: 2006 Mar 03
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1629,6 +1629,10 @@ A jump table for the options with a short description can be found at |Q_op|.
                    menu is only shown when there is more than one match and
                    sufficient colors are available.  |ins-completion-menu|
 
+          menuone  Use the popup menu also when there is only one match.
+                   Useful when there is additional information about the
+                   match, e.g., what file it comes from.
+
           longest  Only insert the longest common text of the matches.  Use
                    CTRL-L to add more characters.  Whether case is ignored
                    depends on the kind of completion.  For buffer text the
index 7c69055e63be1c4245ffe8bc19db317e7caaeee3..0b1784092eee0242191b041466b55af567edd6e5 100644 (file)
@@ -5476,6 +5476,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*
@@ -6608,6 +6609,7 @@ setbufvar()       eval.txt        /*setbufvar()*
 setcmdpos()    eval.txt        /*setcmdpos()*
 setline()      eval.txt        /*setline()*
 setloclist()   eval.txt        /*setloclist()*
+setpos()       eval.txt        /*setpos()*
 setqflist()    eval.txt        /*setqflist()*
 setreg()       eval.txt        /*setreg()*
 setting-guifont        gui.txt /*setting-guifont*
@@ -6986,6 +6988,7 @@ tab-page  tabpage.txt     /*tab-page*
 tab-page-commands      tabpage.txt     /*tab-page-commands*
 tab-page-intro tabpage.txt     /*tab-page-intro*
 tab-page-other tabpage.txt     /*tab-page-other*
+tabline-menu   tabpage.txt     /*tabline-menu*
 tabpage        tabpage.txt     /*tabpage*
 tabpage.txt    tabpage.txt     /*tabpage.txt*
 tabpagebuflist()       eval.txt        /*tabpagebuflist()*
index 98d287abf10596951e02d649e4f4ca0aaa400af5..5809df1bbf0056b17687ab1c1f90814746ff343a 100644 (file)
@@ -129,7 +129,7 @@ static int  ins_compl_make_cyclic __ARGS((void));
 static void ins_compl_upd_pum __ARGS((void));
 static void ins_compl_del_pum __ARGS((void));
 static int  pum_wanted __ARGS((void));
-static int  pum_two_or_more __ARGS((void));
+static int  pum_enough_matches __ARGS((void));
 static void ins_compl_dictionaries __ARGS((char_u *dict, char_u *pat, int flags, int thesaurus));
 static void ins_compl_files __ARGS((int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir));
 static char_u *find_line_end __ARGS((char_u *ptr));
@@ -2347,7 +2347,7 @@ ins_compl_del_pum()
     static int
 pum_wanted()
 {
-    /* 'completeopt' must contain "menu" */
+    /* 'completeopt' must contain "menu" or "menuone" */
     if (vim_strchr(p_cot, 'm') == NULL)
        return FALSE;
 
@@ -2363,9 +2363,10 @@ pum_wanted()
 
 /*
  * Return TRUE if there are two or more matches to be shown in the popup menu.
+ * One if 'completopt' contains "menuone".
  */
     static int
-pum_two_or_more()
+pum_enough_matches()
 {
     compl_T     *compl;
     int                i;
@@ -2382,6 +2383,8 @@ pum_two_or_more()
        compl = compl->cp_next;
     } while (compl != compl_first_match);
 
+    if (strstr((char *)p_cot, "menuone") != NULL)
+       return (i >= 1);
     return (i >= 2);
 }
 
@@ -2401,7 +2404,7 @@ ins_compl_show_pum()
     colnr_T    col;
     int                lead_len = 0;
 
-    if (!pum_wanted() || !pum_two_or_more())
+    if (!pum_wanted() || !pum_enough_matches())
        return;
 
     /* Update the screen before drawing the popup menu over it. */
index f13b369ebd504578deb7ece9dae075bb523a68f1..9e0f3e4f84620996614082b686e39b6790be6911 100644 (file)
@@ -1210,7 +1210,8 @@ EXTERN option_table_T printer_opts[OPT_PRINT_NUM_OPTIONS]
 # define PRT_UNIT_NAMES {"pc", "in", "mm", "pt"}
 #endif
 
-#if defined(FEAT_PRINTER) || defined(FEAT_WINDOWS)
+#if (defined(FEAT_PRINTER) && defined(FEAT_STL_OPT)) \
+           || defined(FEAT_GUI_TABLINE)
 /* Page number used for %N in 'pageheader' and 'guitablabel'. */
 EXTERN linenr_T printer_page_num;
 #endif
index d692edf095eaaff301f36bfd5166bfdec46b416a..23b6be81e8d17d76a47bfc3bb92f653252597a0c 100644 (file)
@@ -2762,7 +2762,7 @@ static char *(p_fdm_values[]) = {"manual", "expr", "marker", "indent", "syntax",
 static char *(p_fcl_values[]) = {"all", NULL};
 #endif
 #ifdef FEAT_INS_EXPAND
-static char *(p_cot_values[]) = {"menu", "longest", NULL};
+static char *(p_cot_values[]) = {"menu", "menuone", "longest", NULL};
 #endif
 
 static void set_option_default __ARGS((int, int opt_flags, int compatible));
index f799b582b3355d9f6c0ce8c114e862cbd0816bc8..c53feca31cdaace24f374d3bd9b370dfe05bc8a2 100644 (file)
@@ -5610,7 +5610,7 @@ win_redr_custom(wp, draw_ruler)
        /* Use 'tabline'.  Always at the first line of the screen. */
        p = p_tal;
        row = 0;
-       fillchar = t_colors < 8 ? '_' : ' ';
+       fillchar = ' ';
        attr = hl_attr(HLF_TPF);
        maxwidth = Columns;
 # ifdef FEAT_EVAL
index 5b1aed61d26b945b501e942a933dc43282b2195b..6a00be193342a3876cbb1cb6c1ed066b3c9c369e 100644 (file)
@@ -151,7 +151,7 @@ typedef struct
     long       wo_fml;
 # define w_p_fml w_onebuf_opt.wo_fml   /* 'foldminlines' */
     long       wo_fdn;
-# define w_p_fdn w_onebuf_opt.wo_fdn   /* 'foldnextmax' */
+# define w_p_fdn w_onebuf_opt.wo_fdn   /* 'foldnestmax' */
 # ifdef FEAT_EVAL
     char_u     *wo_fde;
 # define w_p_fde w_onebuf_opt.wo_fde   /* 'foldexpr' */
index 9df191388f0db262f25b0d621e6f99ed6c7d96d5..5703a06014793f0e83c5262be19ec223870d17ef 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 (2006 Mar 2)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 2, compiled "
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 3)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 3, compiled "