mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.0119
This commit is contained in:
parent
661b182095
commit
4be06f9e1b
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 28
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1585,6 +1585,7 @@ mode() String current editing mode
|
||||
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
|
||||
nr2char( {expr}) String single char with ASCII value {expr}
|
||||
prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum}
|
||||
printf( {fmt}, {expr1}...) String format text
|
||||
range( {expr} [, {max} [, {stride}]])
|
||||
List items from {expr} to {max}
|
||||
readfile({fname} [, {binary} [, {max}]])
|
||||
@ -3337,6 +3338,127 @@ nr2char({expr}) *nr2char()*
|
||||
characters. nr2char(0) is a real NUL and terminates the
|
||||
string, thus results in an empty string.
|
||||
|
||||
printf({fmt}, {expr1} ...) *printf()*
|
||||
Return a String with {fmt}, where "%" items are replaced by
|
||||
the formatted form of their respective arguments. Example: >
|
||||
:echo printf("%4d: E%d %.30s", lnum, err, text)
|
||||
< May result in:
|
||||
99: E42 asdfasdfasdfasdfasdfasdfasdfas ~
|
||||
|
||||
Often used items are:
|
||||
%s string
|
||||
%6s string right-aligned in 6 characters
|
||||
%c character
|
||||
%d decimal number
|
||||
%5d decimal number padded with spaces to 5 characters
|
||||
%x hex number
|
||||
%04x hex number padded with zeros to at least 4 characters
|
||||
%X hex number using upper case letters
|
||||
%o octal number
|
||||
%% the % character
|
||||
|
||||
Conversion specifications start with '%' and end with the
|
||||
conversion type. All other characters are copied unchanged to
|
||||
the result.
|
||||
|
||||
The "%" starts a conversion specification. The following
|
||||
arguments appear in sequence. Overview:
|
||||
|
||||
% flags min-field-width .precision type
|
||||
|
||||
- Zero or more of the following flags:
|
||||
|
||||
# The value should be converted to an "alternate
|
||||
form". For c, d, and s conversions, this option
|
||||
has no effect. For o conversions, the precision
|
||||
of the number is increased to force the first
|
||||
character of the output string to a zero (except
|
||||
if a zero value is printed with an explicit
|
||||
precision of zero).
|
||||
For x and X conversions, a non-zero result has
|
||||
the string "0x" (or "0X" for X conversions)
|
||||
prepended to it.
|
||||
|
||||
0 (zero) Zero padding. For all conversions the converted
|
||||
value is padded on the left with zeros rather
|
||||
than blanks. If a precision is given with a
|
||||
numeric conversion (d, o, x, and X), the 0 flag
|
||||
is ignored.
|
||||
|
||||
- A negative field width flag; the converted value
|
||||
is to be left adjusted on the field boundary.
|
||||
The converted value is padded on the right with
|
||||
blanks, rather than on the left with blanks or
|
||||
zeros. A - overrides a 0 if both are given.
|
||||
|
||||
' ' (space) A blank should be left before a positive
|
||||
number produced by a signed conversion (d).
|
||||
|
||||
+ A sign must always be placed before a number
|
||||
produced by a signed conversion. A + overrides
|
||||
a space if both are used.
|
||||
|
||||
- An optional decimal digit string specifying a minimum
|
||||
field width. If the converted value has fewer characters
|
||||
than the field width, it will be padded with spaces on the
|
||||
left (or right, if the left-adjustment flag has been
|
||||
given) to fill out the field width.
|
||||
|
||||
- An optional precision, in the form of a period '.'
|
||||
followed by an optional digit string. If the digit string
|
||||
is omitted, the precision is taken as zero. This gives
|
||||
the minimum number of digits to appear for d, o, x, and X
|
||||
conversions, or the maximum number of characters to be
|
||||
printed from a string for s conversions.
|
||||
|
||||
- A character that specifies the type of conversion to be
|
||||
applied, see below.
|
||||
|
||||
A field width or precision, or both, may be indicated by an
|
||||
asterisk '*' instead of a digit string. In this case, a
|
||||
Number argument supplies the field width or precision. A
|
||||
negative field width is treated as a left adjustment flag
|
||||
followed by a positive field width; a negative precision is
|
||||
treated as though it were missing. Example: >
|
||||
:echo printf("%d: %.*s", nr, columns, line)
|
||||
< This limits the length of the text used from "line" to
|
||||
"columns" bytes.
|
||||
|
||||
The conversion specifiers and their meanings are:
|
||||
|
||||
doxX The Number argument is converted to signed decimal
|
||||
(d), unsigned octal (o), or unsigned hexadecimal (x
|
||||
and X) notation. The letters "abcdef" are used for
|
||||
x conversions; the letters "ABCDEF" are used for X
|
||||
conversions. The precision, if any, gives the minimum
|
||||
number of digits that must appear; if the converted
|
||||
value requires fewer digits, it is padded on the left
|
||||
with zeros.
|
||||
|
||||
c The Number argument is converted to a byte, and
|
||||
the resulting character is written.
|
||||
|
||||
s The String argument is used. If a precision is
|
||||
specified, no more bytes than the number specified are
|
||||
written.
|
||||
|
||||
% A '%' is written. No argument is converted. The
|
||||
complete conversion specification is "%%".
|
||||
|
||||
Each argument can be Number or String and is converted
|
||||
automatically to fit the conversion specifier.
|
||||
|
||||
In no case does a non-existent or small field width cause
|
||||
truncation of a numeric field; if the result of a conversion
|
||||
is wider than the field width, the field is expanded to
|
||||
contain the conversion result.
|
||||
|
||||
*E766* *767*
|
||||
The number of {exprN} arguments must exactly match the number
|
||||
of "%" items. If there are not sufficient or too many
|
||||
arguments an error is given.
|
||||
|
||||
|
||||
prevnonblank({lnum}) *prevnonblank()*
|
||||
Return the line number of the first line at or above {lnum}
|
||||
that is not blank. Example: >
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2005 Jul 28
|
||||
*index.txt* For Vim version 7.0aa. Last change: 2005 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -150,6 +150,7 @@ commands in CTRL-X submode *i_CTRL-X_index*
|
||||
|i_CTRL-X_CTRL-K| CTRL-X CTRL-K complete identifiers from dictionary
|
||||
|i_CTRL-X_CTRL-L| CTRL-X CTRL-L complete whole lines
|
||||
|i_CTRL-X_CTRL-N| CTRL-X CTRL-N next completion
|
||||
|i_CTRL-X_CTRL-O| CTRL-X CTRL-O occult completion
|
||||
|i_CTRL-X_CTRL-P| CTRL-X CTRL-P previous completion
|
||||
|i_CTRL-X_CTRL-T| CTRL-X CTRL-T complete identifiers from thesaurus
|
||||
|i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2005 Jul 26
|
||||
*insert.txt* For Vim version 7.0aa. Last change: 2005 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -547,7 +547,7 @@ entering new data while keeping all the columns aligned.
|
||||
==============================================================================
|
||||
7. Insert mode completion *ins-completion*
|
||||
|
||||
In Insert and Replace modes, there are several commands to complete part of a
|
||||
In Insert and Replace mode, there are several commands to complete part of a
|
||||
keyword or line that has been typed. This is useful if you are using
|
||||
complicated keywords (e.g., function names with capitals and underscores).
|
||||
|
||||
@ -565,7 +565,9 @@ Completion can be done for:
|
||||
7. file names |i_CTRL-X_CTRL-F|
|
||||
8. definitions or macros |i_CTRL-X_CTRL-D|
|
||||
9. Vim command-line |i_CTRL-X_CTRL-V|
|
||||
10. keywords in 'complete' |i_CTRL-N|
|
||||
10. User defined completion |i_CTRL-X_CTRL-U|
|
||||
11. Occult completion |i_CTRL-X_CTRL-O|
|
||||
12. keywords in 'complete' |i_CTRL-N|
|
||||
|
||||
All these (except 2) are done in CTRL-X mode. This is a sub-mode of Insert
|
||||
and Replace modes. You enter CTRL-X mode by typing CTRL-X and one of the
|
||||
@ -839,7 +841,8 @@ CTRL-X CTRL-D Search in the current and included files for the
|
||||
Completing Vim commands *compl-vim*
|
||||
|
||||
Completion is context-sensitive. It works like on the Command-line. It
|
||||
completes an Ex command as well as its arguments.
|
||||
completes an Ex command as well as its arguments. This is useful when writing
|
||||
a Vim script.
|
||||
|
||||
*i_CTRL-X_CTRL-V*
|
||||
CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
|
||||
@ -858,7 +861,7 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
|
||||
completion, for example: >
|
||||
:imap <Tab> <C-X><C-V>
|
||||
|
||||
User defined completing *compl-function*
|
||||
User defined completion *compl-function*
|
||||
|
||||
Completion is done by a function that can be defined by the user with the
|
||||
'completefunc' option. See the option for how the function is called and an
|
||||
@ -875,6 +878,21 @@ CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
|
||||
previous one.
|
||||
|
||||
|
||||
Occult completion *compl-occult*
|
||||
|
||||
Completion is done by a supernatural being.
|
||||
|
||||
*i_CTRL-X_CTRL-O*
|
||||
CTRL-X CTRL-O Guess what kind of item is in front of the cursor and
|
||||
find the first match for it.
|
||||
CTRL-O or
|
||||
CTRL-N Use the next match. This match replaces the previous
|
||||
one.
|
||||
|
||||
CTRL-P Use the previous match. This match replaces the
|
||||
previous one.
|
||||
|
||||
|
||||
Completing keywords from different sources *compl-generic*
|
||||
|
||||
*i_CTRL-N*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 28
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1585,7 +1585,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
This option specifies a completion function to be used for CTRL-X
|
||||
CTRL-X. The function will be invoked with four arguments:
|
||||
CTRL-U. The function will be invoked with four arguments:
|
||||
a:line the text of the current line
|
||||
a:base the text with which matches should match
|
||||
a:col column in a:line where the cursor is, first column is
|
||||
@ -2282,8 +2282,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|viminfo-file|. And Vim expects the terminal to use utf-8 too. Thus
|
||||
setting 'encoding' to one of these values instead of utf-8 only has
|
||||
effect for encoding used for files when 'fileencoding' is empty.
|
||||
"utf-16" is NOT supported (and probably never will be, since it's such
|
||||
an ugly encoding). *utf-16*
|
||||
|
||||
When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
|
||||
not set yet, the default for 'fileencodings' is changed.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Jul 28
|
||||
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -3648,7 +3648,8 @@ also tell where it was last set. Example: >
|
||||
Last set from /home/mool/vim/vim7/runtime/syntax/syncolor.vim ~
|
||||
|
||||
For details about when this message is given and when it's valid see
|
||||
|:set-verbose|.
|
||||
|:set-verbose|. When ":hi clear" is used then the script where this command
|
||||
is used will be mentioned for the default values.
|
||||
|
||||
*highlight-args* *E416* *E417* *E423*
|
||||
There are three types of terminals for highlighting:
|
||||
|
@ -1596,6 +1596,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
45.4 usr_45.txt /*45.4*
|
||||
45.5 usr_45.txt /*45.5*
|
||||
755 spell.txt /*755*
|
||||
767 eval.txt /*767*
|
||||
90.1 usr_90.txt /*90.1*
|
||||
90.2 usr_90.txt /*90.2*
|
||||
90.3 usr_90.txt /*90.3*
|
||||
@ -3734,6 +3735,7 @@ E762 spell.txt /*E762*
|
||||
E763 spell.txt /*E763*
|
||||
E764 spell.txt /*E764*
|
||||
E765 options.txt /*E765*
|
||||
E766 eval.txt /*E766*
|
||||
E77 message.txt /*E77*
|
||||
E78 motion.txt /*E78*
|
||||
E79 message.txt /*E79*
|
||||
@ -4449,6 +4451,7 @@ compl-filename insert.txt /*compl-filename*
|
||||
compl-function insert.txt /*compl-function*
|
||||
compl-generic insert.txt /*compl-generic*
|
||||
compl-keyword insert.txt /*compl-keyword*
|
||||
compl-occult insert.txt /*compl-occult*
|
||||
compl-tag insert.txt /*compl-tag*
|
||||
compl-vim insert.txt /*compl-vim*
|
||||
compl-whole-line insert.txt /*compl-whole-line*
|
||||
@ -5334,6 +5337,7 @@ i_CTRL-X_CTRL-I insert.txt /*i_CTRL-X_CTRL-I*
|
||||
i_CTRL-X_CTRL-K insert.txt /*i_CTRL-X_CTRL-K*
|
||||
i_CTRL-X_CTRL-L insert.txt /*i_CTRL-X_CTRL-L*
|
||||
i_CTRL-X_CTRL-N insert.txt /*i_CTRL-X_CTRL-N*
|
||||
i_CTRL-X_CTRL-O insert.txt /*i_CTRL-X_CTRL-O*
|
||||
i_CTRL-X_CTRL-P insert.txt /*i_CTRL-X_CTRL-P*
|
||||
i_CTRL-X_CTRL-T insert.txt /*i_CTRL-X_CTRL-T*
|
||||
i_CTRL-X_CTRL-U insert.txt /*i_CTRL-X_CTRL-U*
|
||||
@ -5996,6 +6000,7 @@ print-intro print.txt /*print-intro*
|
||||
print-options print.txt /*print-options*
|
||||
print.txt print.txt /*print.txt*
|
||||
printcap-syntax syntax.txt /*printcap-syntax*
|
||||
printf() eval.txt /*printf()*
|
||||
printing print.txt /*printing*
|
||||
printing-formfeed print.txt /*printing-formfeed*
|
||||
profile repeat.txt /*profile*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 28
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2005 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -30,8 +30,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Is it simple to let ":verbose hi mailSubject" mention where it was last set?
|
||||
|
||||
Mac unicode patch (Da Woon Jung):
|
||||
- selecting proportional font breaks display
|
||||
- UTF-8 text causes display problems. Font replacement causes this.
|
||||
@ -55,10 +53,31 @@ Awaiting response:
|
||||
the screen.
|
||||
- mblen(NULL, 0) also in Vim 6.3?
|
||||
|
||||
Implement printf("blah %d: %s", nr, str)? Use vim_snprintf code.
|
||||
|
||||
PLANNED FOR VERSION 7.0:
|
||||
|
||||
- "INTELLISENSE". First cleanup the Insert-mode completion.
|
||||
- Occult completion: Understands the programming language and finds matches
|
||||
that make sense. Esp. members of classes/structs.
|
||||
|
||||
It's not much different from other Insert-mode completion, use the same
|
||||
mechanism. Use CTRL-X CTRL-O.
|
||||
|
||||
Separately develop the completion logic and the UI. When adding UI stuff
|
||||
make it work for all completion methods.
|
||||
|
||||
First cleanup the Insert-mode completion.
|
||||
|
||||
UI:
|
||||
- Use 'wildmenu' kind of thing.
|
||||
- Put the list of choices right under the place where they would be
|
||||
inserted.
|
||||
|
||||
Completion logic:
|
||||
Use 'coupler' option to list items that connect words. For C: ".,->".
|
||||
In function arguments suggest variables of expected type.
|
||||
|
||||
Ideas from others:
|
||||
http://www.vim.org/scripts/script.php?script_id=747
|
||||
www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang)
|
||||
http://sourceforge.net/projects/insenvim
|
||||
@ -67,9 +86,7 @@ PLANNED FOR VERSION 7.0:
|
||||
and http://stud4.tuwien.ac.at/~e0125672/icomplete/
|
||||
http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
|
||||
Ivan Villanueva has something for Java.
|
||||
Ideas from Emads:
|
||||
http://www.xref-tech.com/xrefactory/more_c_completion.html
|
||||
Can't call it Intellisense, it is a trademark by Microsoft.
|
||||
Emads: http://www.xref-tech.com/xrefactory/more_c_completion.html
|
||||
Ideas from the Vim 7 BOF at SANE:
|
||||
- It's not possible to have one solution for all languages. Design an
|
||||
interface for completion plugins. The matches can be done in a
|
||||
@ -80,11 +97,11 @@ PLANNED FOR VERSION 7.0:
|
||||
- Check Readline for its completion interface.
|
||||
- Use ctags for other languages. Writing a file could trigger running
|
||||
ctags, merging the tags of the changed file.
|
||||
Also see "Visual Assist" http://www.wholetomato.com/products:
|
||||
- Put the list of choices right under the place where they would be
|
||||
inserted.
|
||||
"Visual Assist" http://www.wholetomato.com/products:
|
||||
Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
|
||||
|
||||
- Pre-expand abbreviations, show which abbrevs would match?
|
||||
- Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
|
||||
|
||||
- UNDO TREE: keep all states of the text, don't delete undo info.
|
||||
When making a change, instead of clearing any future undo (thus redo)
|
||||
info, make a new branch.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 28
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2005 Jul 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -409,6 +409,7 @@ New functions: ~
|
||||
|max()| maximum value in a List or Dictionary
|
||||
|min()| minimum value in a List or Dictionary
|
||||
|mkdir()| create a directory
|
||||
|printf()| format text
|
||||
|readfile()| read a file into a list of lines
|
||||
|remove()| remove one or more items from a List or Dictionary
|
||||
|repeat()| repeat "expr" "count" times (Christophe Poucet)
|
||||
|
@ -1009,6 +1009,7 @@ ex_diffsplit(eap)
|
||||
{
|
||||
/* Pretend it was a ":split fname" command */
|
||||
eap->cmdidx = CMD_split;
|
||||
curwin->w_p_diff = TRUE;
|
||||
do_exedit(eap, old_curwin);
|
||||
|
||||
if (curwin != old_curwin) /* split must have worked */
|
||||
|
1352
src/edit.c
1352
src/edit.c
File diff suppressed because it is too large
Load Diff
44
src/eval.c
44
src/eval.c
@ -562,6 +562,7 @@ static void f_mode __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_nextnonblank __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_nr2char __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_prevnonblank __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_printf __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_range __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_readfile __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_remote_expr __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
@ -641,12 +642,10 @@ static typval_T *alloc_string_tv __ARGS((char_u *string));
|
||||
static void free_tv __ARGS((typval_T *varp));
|
||||
static void init_tv __ARGS((typval_T *varp));
|
||||
static long get_tv_number __ARGS((typval_T *varp));
|
||||
static long get_tv_number_chk __ARGS((typval_T *varp, int *denote));
|
||||
static linenr_T get_tv_lnum __ARGS((typval_T *argvars));
|
||||
static linenr_T get_tv_lnum_buf __ARGS((typval_T *argvars, buf_T *buf));
|
||||
static char_u *get_tv_string __ARGS((typval_T *varp));
|
||||
static char_u *get_tv_string_buf __ARGS((typval_T *varp, char_u *buf));
|
||||
static char_u *get_tv_string_chk __ARGS((typval_T *varp));
|
||||
static char_u *get_tv_string_buf_chk __ARGS((typval_T *varp, char_u *buf));
|
||||
static dictitem_T *find_var __ARGS((char_u *name, hashtab_T **htp));
|
||||
static dictitem_T *find_var_in_ht __ARGS((hashtab_T *ht, char_u *varname, int writing));
|
||||
@ -6772,6 +6771,7 @@ static struct fst
|
||||
{"nextnonblank", 1, 1, f_nextnonblank},
|
||||
{"nr2char", 1, 1, f_nr2char},
|
||||
{"prevnonblank", 1, 1, f_prevnonblank},
|
||||
{"printf", 2, 19, f_printf},
|
||||
{"range", 1, 3, f_range},
|
||||
{"readfile", 1, 3, f_readfile},
|
||||
{"remote_expr", 2, 3, f_remote_expr},
|
||||
@ -11875,6 +11875,42 @@ f_prevnonblank(argvars, rettv)
|
||||
rettv->vval.v_number = lnum;
|
||||
}
|
||||
|
||||
/*
|
||||
* "printf()" function
|
||||
*/
|
||||
static void
|
||||
f_printf(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
#ifdef HAVE_STDARG_H
|
||||
{
|
||||
char_u buf[NUMBUFLEN];
|
||||
int len;
|
||||
char_u *s;
|
||||
int saved_did_emsg = did_emsg;
|
||||
char *fmt;
|
||||
|
||||
/* Get the required length, allocate the buffer and do it for real. */
|
||||
did_emsg = FALSE;
|
||||
fmt = (char *)get_tv_string_buf(&argvars[0], buf);
|
||||
len = vim_vsnprintf(NULL, 0, fmt, NULL, argvars + 1);
|
||||
if (!did_emsg)
|
||||
{
|
||||
s = alloc(len + 1);
|
||||
if (s != NULL)
|
||||
{
|
||||
rettv->vval.v_string = s;
|
||||
(void)vim_vsnprintf((char *)s, len + 1, fmt, NULL, argvars + 1);
|
||||
}
|
||||
}
|
||||
did_emsg |= saved_did_emsg;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "range()" function
|
||||
*/
|
||||
@ -15616,7 +15652,7 @@ get_tv_number(varp)
|
||||
return get_tv_number_chk(varp, &error); /* return 0L on error */
|
||||
}
|
||||
|
||||
static long
|
||||
long
|
||||
get_tv_number_chk(varp, denote)
|
||||
typval_T *varp;
|
||||
int *denote;
|
||||
@ -15722,7 +15758,7 @@ get_tv_string_buf(varp, buf)
|
||||
return res != NULL ? res : (char_u *)"";
|
||||
}
|
||||
|
||||
static char_u *
|
||||
char_u *
|
||||
get_tv_string_chk(varp)
|
||||
typval_T *varp;
|
||||
{
|
||||
|
@ -1946,7 +1946,7 @@ vgetorpeek(advance)
|
||||
&& State != CONFIRM
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
&& !((ctrl_x_mode != 0 && vim_is_ctrl_x_key(c1))
|
||||
|| ((continue_status & CONT_LOCAL)
|
||||
|| ((compl_cont_status & CONT_LOCAL)
|
||||
&& (c1 == Ctrl_N || c1 == Ctrl_P)))
|
||||
#endif
|
||||
)
|
||||
|
@ -97,22 +97,28 @@ EXTERN colnr_T dollar_vcol INIT(= 0);
|
||||
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
/*
|
||||
* used for Insert mode completion
|
||||
* Variables for Insert mode completion.
|
||||
*/
|
||||
EXTERN int completion_length INIT(= 0);
|
||||
EXTERN int continue_status INIT(= 0);
|
||||
EXTERN int completion_interrupted INIT(= FALSE);
|
||||
|
||||
/* flags for continue_status */
|
||||
#define CONT_ADDING 1 /* "normal" or "adding" expansion */
|
||||
#define CONT_INTRPT (2 + 4) /* a ^X interrupted the current expansion */
|
||||
/* length of the text being completed (this is deleted to be replaced by the
|
||||
* match) */
|
||||
EXTERN int compl_length INIT(= 0);
|
||||
|
||||
/* Set when character typed while looking for matches and it means we should
|
||||
* stop looking for matches. */
|
||||
EXTERN int compl_interrupted INIT(= FALSE);
|
||||
|
||||
/* List of flags for method of completion. */
|
||||
EXTERN int compl_cont_status INIT(= 0);
|
||||
# define CONT_ADDING 1 /* "normal" or "adding" expansion */
|
||||
# define CONT_INTRPT (2 + 4) /* a ^X interrupted the current expansion */
|
||||
/* it's set only iff N_ADDS is set */
|
||||
#define CONT_N_ADDS 4 /* next ^X<> will add-new or expand-current */
|
||||
#define CONT_S_IPOS 8 /* next ^X<> will set initial_pos?
|
||||
# define CONT_N_ADDS 4 /* next ^X<> will add-new or expand-current */
|
||||
# define CONT_S_IPOS 8 /* next ^X<> will set initial_pos?
|
||||
* if so, word-wise-expansion will set SOL */
|
||||
#define CONT_SOL 16 /* pattern includes start of line, just for
|
||||
# define CONT_SOL 16 /* pattern includes start of line, just for
|
||||
* word-wise expansion, not set for ^X^L */
|
||||
#define CONT_LOCAL 32 /* for ctrl_x_mode 0, ^X^P/^X^N do a local
|
||||
# define CONT_LOCAL 32 /* for ctrl_x_mode 0, ^X^P/^X^N do a local
|
||||
* expansion, (eg use complete=.) */
|
||||
#endif
|
||||
|
||||
@ -1389,7 +1395,8 @@ EXTERN char_u e_invexprmsg[] INIT(=N_("E449: Invalid expression received"));
|
||||
EXTERN char_u e_guarded[] INIT(=N_("E463: Region is guarded, cannot modify"));
|
||||
EXTERN char_u e_nbreadonly[] INIT(=N_("E744: NetBeans does not allow changes in read-only files"));
|
||||
#endif
|
||||
#if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) || defined(PROTO)
|
||||
#if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(FEAT_SYN_HL) \
|
||||
|| defined(PROTO)
|
||||
EXTERN char_u e_intern2[] INIT(=N_("E685: Internal error: %s"));
|
||||
#endif
|
||||
EXTERN char_u e_maxmempat[] INIT(=N_("E363: pattern uses more memory than 'maxmempattern'"));
|
||||
|
164
src/message.c
164
src/message.c
@ -376,7 +376,6 @@ smsg_attr(attr, s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
# else /* HAVE_STDARG_H */
|
||||
|
||||
int vim_snprintf(char *str, size_t str_m, char *fmt, ...);
|
||||
static int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap);
|
||||
|
||||
int
|
||||
#ifdef __BORLANDC__
|
||||
@ -387,7 +386,7 @@ smsg(char_u *s, ...)
|
||||
va_list arglist;
|
||||
|
||||
va_start(arglist, s);
|
||||
vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist);
|
||||
vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist, NULL);
|
||||
va_end(arglist);
|
||||
return msg(IObuff);
|
||||
}
|
||||
@ -401,7 +400,7 @@ smsg_attr(int attr, char_u *s, ...)
|
||||
va_list arglist;
|
||||
|
||||
va_start(arglist, s);
|
||||
vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist);
|
||||
vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist, NULL);
|
||||
va_end(arglist);
|
||||
return msg_attr(IObuff, attr);
|
||||
}
|
||||
@ -3706,6 +3705,58 @@ do_browse(flags, title, dflt, ext, initdir, filter, buf)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_STDARG_H) && defined(FEAT_EVAL)
|
||||
static char *e_printf = N_("E766: Insufficient arguments for printf()");
|
||||
|
||||
static long tv_nr __ARGS((typval_T *tvs, int *idxp));
|
||||
static char *tv_str __ARGS((typval_T *tvs, int *idxp));
|
||||
|
||||
/*
|
||||
* Get number argument from "idxp" entry in "tvs". First entry is 1.
|
||||
*/
|
||||
static long
|
||||
tv_nr(tvs, idxp)
|
||||
typval_T *tvs;
|
||||
int *idxp;
|
||||
{
|
||||
int idx = *idxp - 1;
|
||||
long n = 0;
|
||||
int err = FALSE;
|
||||
|
||||
if (tvs[idx].v_type == VAR_UNKNOWN)
|
||||
EMSG(_(e_printf));
|
||||
else
|
||||
{
|
||||
++*idxp;
|
||||
n = get_tv_number_chk(&tvs[idx], &err);
|
||||
if (err)
|
||||
n = 0;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get string argument from "idxp" entry in "tvs". First entry is 1.
|
||||
*/
|
||||
static char *
|
||||
tv_str(tvs, idxp)
|
||||
typval_T *tvs;
|
||||
int *idxp;
|
||||
{
|
||||
int idx = *idxp - 1;
|
||||
char *s = NULL;
|
||||
|
||||
if (tvs[idx].v_type == VAR_UNKNOWN)
|
||||
EMSG(_(e_printf));
|
||||
else
|
||||
{
|
||||
++*idxp;
|
||||
s = (char *)get_tv_string_chk(&tvs[idx]);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This code was included to provide a portable vsnprintf() and snprintf().
|
||||
* Some systems may provide their own, but we always use these for
|
||||
@ -3741,6 +3792,9 @@ do_browse(flags, title, dflt, ext, initdir, filter, buf)
|
||||
|
||||
/*
|
||||
* When va_list is not supported we only define vim_snprintf().
|
||||
*
|
||||
* vim_vsnprintf() can be invoked with either "va_list" or a list of
|
||||
* "typval_T". The other must be NULL.
|
||||
*/
|
||||
|
||||
/* When generating prototypes all of this is skipped, cproto doesn't
|
||||
@ -3754,16 +3808,16 @@ vim_snprintf(char *str, size_t str_m, char *fmt, ...)
|
||||
int str_l;
|
||||
|
||||
va_start(ap, fmt);
|
||||
str_l = vim_vsnprintf(str, str_m, fmt, ap);
|
||||
str_l = vim_vsnprintf(str, str_m, fmt, ap, NULL);
|
||||
va_end(ap);
|
||||
return str_l;
|
||||
}
|
||||
|
||||
static int
|
||||
vim_vsnprintf(str, str_m, fmt, ap)
|
||||
int
|
||||
vim_vsnprintf(str, str_m, fmt, ap, tvs)
|
||||
# else
|
||||
/* clumsy way to work around missing va_list */
|
||||
# define get_a_arg(i) (i == 1 ? a1 : i == 2 ? a2 : i == 3 ? a3 : i == 4 ? a4 : i == 5 ? a5 : i == 6 ? a6 : i == 7 ? a7 : i == 8 ? a8 : i == 9 ? a9 : a10)
|
||||
# define get_a_arg(i) (++i, i == 2 ? a1 : i == 3 ? a2 : i == 4 ? a3 : i == 5 ? a4 : i == 6 ? a5 : i == 7 ? a6 : i == 8 ? a7 : i == 9 ? a8 : i == 10 ? a9 : a10)
|
||||
|
||||
/* VARARGS */
|
||||
int
|
||||
@ -3777,15 +3831,14 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
char *fmt;
|
||||
# ifdef HAVE_STDARG_H
|
||||
va_list ap;
|
||||
typval_T *tvs;
|
||||
# else
|
||||
long a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
|
||||
# endif
|
||||
{
|
||||
size_t str_l = 0;
|
||||
char *p = fmt;
|
||||
# ifndef HAVE_STDARG_H
|
||||
int arg_idx = 1;
|
||||
# endif
|
||||
|
||||
if (p == NULL)
|
||||
p = "";
|
||||
@ -3873,11 +3926,14 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
int j;
|
||||
|
||||
p++;
|
||||
j =
|
||||
#ifndef HAVE_STDARG_H
|
||||
j = get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
get_a_arg(arg_idx);
|
||||
#else
|
||||
j = va_arg(ap, int);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, int);
|
||||
#endif
|
||||
if (j >= 0)
|
||||
min_field_width = j;
|
||||
@ -3907,11 +3963,14 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
{
|
||||
int j;
|
||||
|
||||
j =
|
||||
#ifndef HAVE_STDARG_H
|
||||
j = get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
get_a_arg(arg_idx);
|
||||
#else
|
||||
j = va_arg(ap, int);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, int);
|
||||
#endif
|
||||
p++;
|
||||
if (j >= 0)
|
||||
@ -3979,11 +4038,15 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
case 'c':
|
||||
{
|
||||
int j;
|
||||
|
||||
j =
|
||||
#ifndef HAVE_STDARG_H
|
||||
j = get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
get_a_arg(arg_idx);
|
||||
#else
|
||||
j = va_arg(ap, int);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, int);
|
||||
#endif
|
||||
/* standard demands unsigned char */
|
||||
uchar_arg = (unsigned char)j;
|
||||
@ -3992,11 +4055,14 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
}
|
||||
|
||||
case 's':
|
||||
str_arg =
|
||||
#ifndef HAVE_STDARG_H
|
||||
str_arg = (char *)get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
(char *)get_a_arg(arg_idx);
|
||||
#else
|
||||
str_arg = va_arg(ap, char *);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_str(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, char *);
|
||||
#endif
|
||||
if (str_arg == NULL)
|
||||
{
|
||||
@ -4053,11 +4119,14 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
if (fmt_spec == 'p')
|
||||
{
|
||||
length_modifier = '\0';
|
||||
ptr_arg =
|
||||
#ifndef HAVE_STDARG_H
|
||||
ptr_arg = (void *)get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
(void *)get_a_arg(arg_idx);
|
||||
#else
|
||||
ptr_arg = va_arg(ap, void *);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? (void *)tv_str(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, void *);
|
||||
#endif
|
||||
if (ptr_arg != NULL)
|
||||
arg_sign = 1;
|
||||
@ -4069,16 +4138,15 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
{
|
||||
case '\0':
|
||||
case 'h':
|
||||
/* It is non-portable to specify a second argument
|
||||
* of char or short to va_arg, because arguments
|
||||
* seen by the called function are not char or
|
||||
* short. C converts char and short arguments to
|
||||
* int before passing them to a function. */
|
||||
/* char and short arguments are passed as int. */
|
||||
int_arg =
|
||||
#ifndef HAVE_STDARG_H
|
||||
int_arg = get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
get_a_arg(arg_idx);
|
||||
#else
|
||||
int_arg = va_arg(ap, int);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, int);
|
||||
#endif
|
||||
if (int_arg > 0)
|
||||
arg_sign = 1;
|
||||
@ -4086,11 +4154,14 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
arg_sign = -1;
|
||||
break;
|
||||
case 'l':
|
||||
long_arg =
|
||||
#ifndef HAVE_STDARG_H
|
||||
long_arg = get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
get_a_arg(arg_idx);
|
||||
#else
|
||||
long_arg = va_arg(ap, long int);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, long int);
|
||||
#endif
|
||||
if (long_arg > 0)
|
||||
arg_sign = 1;
|
||||
@ -4106,21 +4177,27 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
{
|
||||
case '\0':
|
||||
case 'h':
|
||||
uint_arg =
|
||||
#ifndef HAVE_STDARG_H
|
||||
uint_arg = get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
get_a_arg(arg_idx);
|
||||
#else
|
||||
uint_arg = va_arg(ap, unsigned int);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, unsigned int);
|
||||
#endif
|
||||
if (uint_arg != 0)
|
||||
arg_sign = 1;
|
||||
break;
|
||||
case 'l':
|
||||
ulong_arg =
|
||||
#ifndef HAVE_STDARG_H
|
||||
ulong_arg = get_a_arg(arg_idx);
|
||||
++arg_idx;
|
||||
get_a_arg(arg_idx);
|
||||
#else
|
||||
ulong_arg = va_arg(ap, unsigned long int);
|
||||
# if defined(FEAT_EVAL)
|
||||
ap == NULL ? tv_nr(tvs, &arg_idx) :
|
||||
# endif
|
||||
va_arg(ap, unsigned long int);
|
||||
#endif
|
||||
if (ulong_arg != 0)
|
||||
arg_sign = 1;
|
||||
@ -4400,6 +4477,11 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
|
||||
str[str_l <= str_m - 1 ? str_l : str_m - 1] = '\0';
|
||||
}
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
if (ap == NULL && tvs[arg_idx - 1].v_type != VAR_UNKNOWN)
|
||||
EMSG(_("E767: Too many arguments to printf()"));
|
||||
#endif
|
||||
|
||||
/* Return the number of characters formatted (excluding trailing nul
|
||||
* character), that is, the number of characters that would have been
|
||||
* written to the buffer if it were large enough. */
|
||||
|
@ -97,6 +97,10 @@ language.
|
||||
Background: on Solaris an empty msgstr results in an empty message; GNU
|
||||
gettext ignores empty strings and items marked with "#, fuzzy".
|
||||
|
||||
This also removes the line numbers from the file, so that patches are not
|
||||
messed up by changes in line numbers and show the actual changes in the
|
||||
text.
|
||||
|
||||
(4) Check:
|
||||
|
||||
vim -S check.vim xx.po
|
||||
|
1291
src/po/af.po
1291
src/po/af.po
File diff suppressed because it is too large
Load Diff
1394
src/po/ca.po
1394
src/po/ca.po
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,9 @@
|
||||
" Vim script to cleanup a .po file: comment-out fuzzy and empty messages.
|
||||
" Make sure there is a space before the string (required for Solaris).
|
||||
" Vim script to cleanup a .po file:
|
||||
" - Remove line numbers (avoids that diffs are messy).
|
||||
" - 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).
|
||||
g/^#: /d
|
||||
g/^#, fuzzy\(, .*\)\=\nmsgid ""\@!/.+1,/^$/-1s/^/#\~ /
|
||||
g/^msgstr"/s//msgstr "/
|
||||
g/^msgid"/s//msgid "/
|
||||
|
1290
src/po/cs.cp1250.po
1290
src/po/cs.cp1250.po
File diff suppressed because it is too large
Load Diff
1290
src/po/cs.po
1290
src/po/cs.po
File diff suppressed because it is too large
Load Diff
1426
src/po/de.po
1426
src/po/de.po
File diff suppressed because it is too large
Load Diff
1453
src/po/es.po
1453
src/po/es.po
File diff suppressed because it is too large
Load Diff
1394
src/po/fr.po
1394
src/po/fr.po
File diff suppressed because it is too large
Load Diff
1544
src/po/ga.po
1544
src/po/ga.po
File diff suppressed because it is too large
Load Diff
1613
src/po/it.po
1613
src/po/it.po
File diff suppressed because it is too large
Load Diff
1543
src/po/ja.po
1543
src/po/ja.po
File diff suppressed because it is too large
Load Diff
1543
src/po/ja.sjis.po
1543
src/po/ja.sjis.po
File diff suppressed because it is too large
Load Diff
1426
src/po/ko.po
1426
src/po/ko.po
File diff suppressed because it is too large
Load Diff
1428
src/po/no.po
1428
src/po/no.po
File diff suppressed because it is too large
Load Diff
1607
src/po/pl.cp1250.po
1607
src/po/pl.cp1250.po
File diff suppressed because it is too large
Load Diff
1607
src/po/pl.po
1607
src/po/pl.po
File diff suppressed because it is too large
Load Diff
1428
src/po/ru.cp1251.po
1428
src/po/ru.cp1251.po
File diff suppressed because it is too large
Load Diff
1428
src/po/ru.po
1428
src/po/ru.po
File diff suppressed because it is too large
Load Diff
1302
src/po/sk.cp1250.po
1302
src/po/sk.cp1250.po
File diff suppressed because it is too large
Load Diff
1302
src/po/sk.po
1302
src/po/sk.po
File diff suppressed because it is too large
Load Diff
1429
src/po/sv.po
1429
src/po/sv.po
File diff suppressed because it is too large
Load Diff
1323
src/po/uk.cp1251.po
1323
src/po/uk.cp1251.po
File diff suppressed because it is too large
Load Diff
1323
src/po/uk.po
1323
src/po/uk.po
File diff suppressed because it is too large
Load Diff
1428
src/po/vi.po
1428
src/po/vi.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1299
src/po/zh_CN.po
1299
src/po/zh_CN.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1428
src/po/zh_TW.po
1428
src/po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@ -120,6 +120,7 @@ int
|
||||
_RTLENTRYF
|
||||
# endif
|
||||
vim_snprintf __ARGS((char *, size_t, char *, ...));
|
||||
int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs);
|
||||
# endif
|
||||
|
||||
# include "message.pro"
|
||||
|
@ -61,6 +61,8 @@ char_u *v_exception __ARGS((char_u *oldval));
|
||||
char_u *v_throwpoint __ARGS((char_u *oldval));
|
||||
char_u *set_cmdarg __ARGS((exarg_T *eap, char_u *oldarg));
|
||||
void clear_tv __ARGS((typval_T *varp));
|
||||
long get_tv_number_chk __ARGS((typval_T *varp, int *denote));
|
||||
char_u *get_tv_string_chk __ARGS((typval_T *varp));
|
||||
char_u *get_var_value __ARGS((char_u *name));
|
||||
void new_script_vars __ARGS((scid_T id));
|
||||
void init_var_dict __ARGS((dict_T *dict, dictitem_T *dict_var));
|
||||
|
29
src/search.c
29
src/search.c
@ -1357,15 +1357,16 @@ search_for_exact_line(buf, pos, dir, pat)
|
||||
|
||||
/* when adding lines the matching line may be empty but it is not
|
||||
* ignored because we are interested in the next line -- Acevedo */
|
||||
if ((continue_status & CONT_ADDING) && !(continue_status & CONT_SOL))
|
||||
if ((compl_cont_status & CONT_ADDING)
|
||||
&& !(compl_cont_status & CONT_SOL))
|
||||
{
|
||||
if ((p_ic ? MB_STRICMP(p, pat) : STRCMP(p, pat)) == 0)
|
||||
return OK;
|
||||
}
|
||||
else if (*p != NUL) /* ignore empty lines */
|
||||
{ /* expanding lines or words */
|
||||
if ((p_ic ? MB_STRNICMP(p, pat, completion_length)
|
||||
: STRNCMP(p, pat, completion_length)) == 0)
|
||||
if ((p_ic ? MB_STRNICMP(p, pat, compl_length)
|
||||
: STRNCMP(p, pat, compl_length)) == 0)
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
@ -4283,7 +4284,7 @@ linewhite(lnum)
|
||||
#if defined(FEAT_FIND_ID) || defined(PROTO)
|
||||
/*
|
||||
* Find identifiers or defines in included files.
|
||||
* if p_ic && (continue_status & CONT_SOL) then ptr must be in lowercase.
|
||||
* if p_ic && (compl_cont_status & CONT_SOL) then ptr must be in lowercase.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
@ -4353,7 +4354,7 @@ find_pattern_in_path(ptr, dir, len, whole, skip_comments,
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
/* when CONT_SOL is set compare "ptr" with the beginning of the line
|
||||
* is faster than quote_meta/regcomp/regexec "ptr" -- Acevedo */
|
||||
&& !(continue_status & CONT_SOL)
|
||||
&& !(compl_cont_status & CONT_SOL)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@ -4601,7 +4602,7 @@ search_line:
|
||||
{
|
||||
if (define_matched
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
|| (continue_status & CONT_SOL)
|
||||
|| (compl_cont_status & CONT_SOL)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@ -4679,9 +4680,9 @@ search_line:
|
||||
break;
|
||||
found = TRUE;
|
||||
aux = p = startp;
|
||||
if (continue_status & CONT_ADDING)
|
||||
if (compl_cont_status & CONT_ADDING)
|
||||
{
|
||||
p += completion_length;
|
||||
p += compl_length;
|
||||
if (vim_iswordp(p))
|
||||
goto exit_matched;
|
||||
p = find_word_start(p);
|
||||
@ -4689,10 +4690,10 @@ search_line:
|
||||
p = find_word_end(p);
|
||||
i = (int)(p - aux);
|
||||
|
||||
if ((continue_status & CONT_ADDING) && i == completion_length)
|
||||
if ((compl_cont_status & CONT_ADDING) && i == compl_length)
|
||||
{
|
||||
/* get the next line */
|
||||
/* IOSIZE > completion_length, so the STRNCPY works */
|
||||
/* IOSIZE > compl_length, so the STRNCPY works */
|
||||
STRNCPY(IObuff, aux, i);
|
||||
if (!( depth < 0
|
||||
&& lnum < end_lnum
|
||||
@ -4732,7 +4733,7 @@ search_line:
|
||||
IObuff[i] = NUL;
|
||||
aux = IObuff;
|
||||
|
||||
if (i == completion_length)
|
||||
if (i == compl_length)
|
||||
goto exit_matched;
|
||||
}
|
||||
|
||||
@ -4864,7 +4865,7 @@ exit_matched:
|
||||
if (def_regmatch.regprog == NULL
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
&& action == ACTION_EXPAND
|
||||
&& !(continue_status & CONT_SOL)
|
||||
&& !(compl_cont_status & CONT_SOL)
|
||||
#endif
|
||||
&& *(p = startp + 1))
|
||||
goto search_line;
|
||||
@ -4873,7 +4874,7 @@ exit_matched:
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
if (action == ACTION_EXPAND)
|
||||
ins_compl_check_keys();
|
||||
if (got_int || completion_interrupted)
|
||||
if (got_int || compl_interrupted)
|
||||
#else
|
||||
if (got_int)
|
||||
#endif
|
||||
@ -4936,7 +4937,7 @@ exit_matched:
|
||||
)
|
||||
{
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
if (got_int || completion_interrupted)
|
||||
if (got_int || compl_interrupted)
|
||||
#else
|
||||
if (got_int)
|
||||
#endif
|
||||
|
@ -1383,7 +1383,7 @@ find_tags(pat, num_matches, matchesp, flags, mincount, buf_ffname)
|
||||
#ifdef FEAT_INS_EXPAND
|
||||
if ((flags & TAG_INS_COMP)) /* Double brackets for gcc */
|
||||
ins_compl_check_keys();
|
||||
if (got_int || completion_interrupted)
|
||||
if (got_int || compl_interrupted)
|
||||
#else
|
||||
if (got_int)
|
||||
#endif
|
||||
|
@ -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 Jul 28)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jul 28, compiled "
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jul 29)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jul 29, compiled "
|
||||
|
Loading…
x
Reference in New Issue
Block a user