0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.0077

This commit is contained in:
Bram Moolenaar
2005-05-31 22:14:58 +00:00
parent a04f10b606
commit 5c06f8b043
14 changed files with 203 additions and 52 deletions

View 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 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1494,8 +1494,20 @@ found here: |sort()|.
With [i] case is ignored. 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 With [u] only keep the first of a sequence of
identical lines (ignoring case when [i] is used). 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 When /{pattern}/ is specified the text matched with
{pattern} is skipped, so that you sort on what comes {pattern} is skipped, so that you sort on what comes
@@ -1509,5 +1521,7 @@ found here: |sort()|.
ignoring the difference between tabs and spaces): > ignoring the difference between tabs and spaces): >
:sort /.*\%10v/ :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: vim:tw=78:ts=8:ft=help:norl:

View 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 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3743,6 +3743,8 @@ split({expr} [, {pattern} [, {keepempty}]]) *split()*
removing the matched characters. removing the matched characters.
When the first or last item is empty it is omitted, unless the When the first or last item is empty it is omitted, unless the
{keepempty} argument is given and it's non-zero. {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: > Example: >
:let words = split(getline('.'), '\W\+') :let words = split(getline('.'), '\W\+')
< To split a string in individual characters: > < To split a string in individual characters: >

View 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 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 can also be set with the "-V" argument. See |-V|.
This option is also set by the |:verbose| command. 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'*
'viewdir' 'vdir' string (default for Amiga, MS-DOS, OS/2 and Win32: 'viewdir' 'vdir' string (default for Amiga, MS-DOS, OS/2 and Win32:
"$VIM/vimfiles/view", "$VIM/vimfiles/view",

View File

@@ -937,6 +937,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'vdir' options.txt /*'vdir'* 'vdir' options.txt /*'vdir'*
've' options.txt /*'ve'* 've' options.txt /*'ve'*
'verbose' options.txt /*'verbose'* 'verbose' options.txt /*'verbose'*
'verbosefile' options.txt /*'verbosefile'*
'vfile' options.txt /*'vfile'*
'vi' options.txt /*'vi'* 'vi' options.txt /*'vi'*
'viewdir' options.txt /*'viewdir'* 'viewdir' options.txt /*'viewdir'*
'viewoptions' options.txt /*'viewoptions'* 'viewoptions' options.txt /*'viewoptions'*
@@ -5119,6 +5121,7 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt* hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help* help various.txt /*help*
help-context help.txt /*help-context* help-context help.txt /*help-context*
help-tags tags 1
help-translated various.txt /*help-translated* help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window* help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt* help.txt help.txt /*help.txt*

View File

@@ -1829,7 +1829,7 @@ skipwhite(p)
} }
/* /*
* skipdigits: skip over digits; * skip over digits
*/ */
char_u * char_u *
skipdigits(p) skipdigits(p)
@@ -1840,6 +1840,32 @@ skipdigits(p)
return 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. * Variant of isdigit() that can handle characters > 0x100.
* We don't use isdigit() here, because on some systems it also considers * 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 "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 "nptr" is not NULL, the signed result is returned in it.
* If "unptr" is not NULL, the unsigned 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 void
vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr) vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr)
@@ -1995,9 +2025,7 @@ vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr)
/* /*
* Do the string-to-numeric conversion "manually" to avoid sscanf quirks. * Do the string-to-numeric conversion "manually" to avoid sscanf quirks.
*/ */
if (hex) if (hex == '0' || dooct > 1)
{
if (hex == '0')
{ {
/* octal */ /* octal */
while ('0' <= *ptr && *ptr <= '7') while ('0' <= *ptr && *ptr <= '7')
@@ -2006,7 +2034,7 @@ vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr)
++ptr; ++ptr;
} }
} }
else else if (hex != 0 || dohex > 1)
{ {
/* hex */ /* hex */
while (vim_isxdigit(*ptr)) while (vim_isxdigit(*ptr))
@@ -2015,7 +2043,6 @@ vim_str2nr(start, hexp, len, dooct, dohex, nptr, unptr)
++ptr; ++ptr;
} }
} }
}
else else
{ {
/* decimal */ /* decimal */

View File

@@ -523,14 +523,22 @@ throw_exception(value, type, cmdname)
if (debug_break_level > 0) if (debug_break_level > 0)
msg_silent = FALSE; /* display messages */ msg_silent = FALSE; /* display messages */
else
verbose_enter();
++no_wait_return; ++no_wait_return;
if (debug_break_level > 0 || *p_vfile == NUL)
msg_scroll = TRUE; /* always scroll up, don't overwrite */ msg_scroll = TRUE; /* always scroll up, don't overwrite */
smsg((char_u *)_("Exception thrown: %s"), excp->value); smsg((char_u *)_("Exception thrown: %s"), excp->value);
msg_puts((char_u *)"\n"); /* don't overwrite this either */ msg_puts((char_u *)"\n"); /* don't overwrite this either */
if (debug_break_level > 0 || *p_vfile == NUL)
cmdline_row = msg_row; cmdline_row = msg_row;
--no_wait_return; --no_wait_return;
if (debug_break_level > 0) if (debug_break_level > 0)
msg_silent = save_msg_silent; msg_silent = save_msg_silent;
else
verbose_leave();
} }
current_exception = excp; current_exception = excp;
@@ -569,17 +577,23 @@ discard_exception(excp, was_finished)
saved_IObuff = vim_strsave(IObuff); saved_IObuff = vim_strsave(IObuff);
if (debug_break_level > 0) if (debug_break_level > 0)
msg_silent = FALSE; /* display messages */ msg_silent = FALSE; /* display messages */
else
verbose_enter();
++no_wait_return; ++no_wait_return;
if (debug_break_level > 0 || *p_vfile == NUL)
msg_scroll = TRUE; /* always scroll up, don't overwrite */ msg_scroll = TRUE; /* always scroll up, don't overwrite */
smsg(was_finished smsg(was_finished
? (char_u *)_("Exception finished: %s") ? (char_u *)_("Exception finished: %s")
: (char_u *)_("Exception discarded: %s"), : (char_u *)_("Exception discarded: %s"),
excp->value); excp->value);
msg_puts((char_u *)"\n"); /* don't overwrite this either */ msg_puts((char_u *)"\n"); /* don't overwrite this either */
if (debug_break_level > 0 || *p_vfile == NUL)
cmdline_row = msg_row; cmdline_row = msg_row;
--no_wait_return; --no_wait_return;
if (debug_break_level > 0) if (debug_break_level > 0)
msg_silent = save_msg_silent; msg_silent = save_msg_silent;
else
verbose_leave();
STRCPY(IObuff, saved_IObuff); STRCPY(IObuff, saved_IObuff);
vim_free(saved_IObuff); vim_free(saved_IObuff);
} }
@@ -632,14 +646,22 @@ catch_exception(excp)
if (debug_break_level > 0) if (debug_break_level > 0)
msg_silent = FALSE; /* display messages */ msg_silent = FALSE; /* display messages */
else
verbose_enter();
++no_wait_return; ++no_wait_return;
if (debug_break_level > 0 || *p_vfile == NUL)
msg_scroll = TRUE; /* always scroll up, don't overwrite */ msg_scroll = TRUE; /* always scroll up, don't overwrite */
smsg((char_u *)_("Exception caught: %s"), excp->value); smsg((char_u *)_("Exception caught: %s"), excp->value);
msg_puts((char_u *)"\n"); /* don't overwrite this either */ msg_puts((char_u *)"\n"); /* don't overwrite this either */
if (debug_break_level > 0 || *p_vfile == NUL)
cmdline_row = msg_row; cmdline_row = msg_row;
--no_wait_return; --no_wait_return;
if (debug_break_level > 0) if (debug_break_level > 0)
msg_silent = save_msg_silent; msg_silent = save_msg_silent;
else
verbose_leave();
} }
} }
@@ -785,7 +807,13 @@ report_make_pending(pending, value)
void *value; void *value;
{ {
if (p_verbose >= 14 || debug_break_level > 0) if (p_verbose >= 14 || debug_break_level > 0)
{
if (debug_break_level <= 0)
verbose_enter();
report_pending(RP_MAKE, pending, value); report_pending(RP_MAKE, pending, value);
if (debug_break_level <= 0)
verbose_leave();
}
} }
/* /*
@@ -798,7 +826,13 @@ report_resume_pending(pending, value)
void *value; void *value;
{ {
if (p_verbose >= 14 || debug_break_level > 0) if (p_verbose >= 14 || debug_break_level > 0)
{
if (debug_break_level <= 0)
verbose_enter();
report_pending(RP_RESUME, pending, value); report_pending(RP_RESUME, pending, value);
if (debug_break_level <= 0)
verbose_leave();
}
} }
/* /*
@@ -811,7 +845,13 @@ report_discard_pending(pending, value)
void *value; void *value;
{ {
if (p_verbose >= 14 || debug_break_level > 0) if (p_verbose >= 14 || debug_break_level > 0)
{
if (debug_break_level <= 0)
verbose_enter();
report_pending(RP_DISCARD, pending, value); report_pending(RP_DISCARD, pending, value);
if (debug_break_level <= 0)
verbose_leave();
}
} }

View File

@@ -3966,6 +3966,7 @@ gui_mch_destroy_sign(sign)
vim_free(sign); vim_free(sign);
} }
} }
#endif
#if defined(FEAT_BEVAL) || defined(PROTO) #if defined(FEAT_BEVAL) || defined(PROTO)
@@ -4231,5 +4232,3 @@ netbeans_draw_multisign_indicator(int row)
SetPixel(s_hdc, x+2, y, gui.currFgColor); SetPixel(s_hdc, x+2, y, gui.currFgColor);
} }
#endif #endif
#endif

View File

@@ -1130,7 +1130,7 @@ cs_find_common(opt, pat, forceit, verbose)
if (matches == NULL) if (matches == NULL)
return FALSE; 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); return do_tag((char_u *)pat, DT_CSCOPE, 0, forceit, verbose);
} }

View File

@@ -2606,10 +2606,12 @@ call_shell(cmd, opt)
if (p_verbose > 3) if (p_verbose > 3)
{ {
verbose_enter();
smsg((char_u *)_("Calling shell to execute: \"%s\""), smsg((char_u *)_("Calling shell to execute: \"%s\""),
cmd == NULL ? p_sh : cmd); cmd == NULL ? p_sh : cmd);
out_char('\n'); out_char('\n');
cursor_on(); cursor_on();
verbose_leave();
} }
#ifdef FEAT_PROFILE #ifdef FEAT_PROFILE
@@ -4059,13 +4061,12 @@ vim_findfile(search_ctx)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) if (p_verbose >= 5)
{ {
/* always scroll up, don't overwrite */ verbose_enter_scroll();
msg_scroll = TRUE;
smsg((char_u *)"Already Searched: %s (%s)", smsg((char_u *)"Already Searched: %s (%s)",
ctx->ffs_fix_path, ctx->ffs_wc_path); ctx->ffs_fix_path, ctx->ffs_wc_path);
/* don't overwrite this either */ /* don't overwrite this either */
msg_puts((char_u *)"\n"); msg_puts((char_u *)"\n");
cmdline_row = msg_row; verbose_leave_scroll();
} }
#endif #endif
ff_free_stack_element(ctx); ff_free_stack_element(ctx);
@@ -4074,13 +4075,12 @@ vim_findfile(search_ctx)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
else if (p_verbose >= 5) else if (p_verbose >= 5)
{ {
/* always scroll up, don't overwrite */ verbose_enter_scroll();
msg_scroll = TRUE;
smsg((char_u *)"Searching: %s (%s)", smsg((char_u *)"Searching: %s (%s)",
ctx->ffs_fix_path, ctx->ffs_wc_path); ctx->ffs_fix_path, ctx->ffs_wc_path);
/* don't overwrite this either */ /* don't overwrite this either */
msg_puts((char_u *)"\n"); msg_puts((char_u *)"\n");
cmdline_row = msg_row; verbose_leave_scroll();
} }
#endif #endif
@@ -4264,13 +4264,12 @@ vim_findfile(search_ctx)
{ {
if (p_verbose >= 5) if (p_verbose >= 5)
{ {
/* always scroll up, don't overwrite */ verbose_enter_scroll();
msg_scroll = TRUE;
smsg((char_u *)"Already: %s", smsg((char_u *)"Already: %s",
file_path); file_path);
/* don't overwrite this either */ /* don't overwrite this either */
msg_puts((char_u *)"\n"); msg_puts((char_u *)"\n");
cmdline_row = msg_row; verbose_leave_scroll();
} }
continue; continue;
} }
@@ -4293,12 +4292,11 @@ vim_findfile(search_ctx)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) if (p_verbose >= 5)
{ {
/* always scroll up, don't overwrite */ verbose_enter_scroll();
msg_scroll = TRUE;
smsg((char_u *)"HIT: %s", file_path); smsg((char_u *)"HIT: %s", file_path);
/* don't overwrite this either */ /* don't overwrite this either */
msg_puts((char_u *)"\n"); msg_puts((char_u *)"\n");
cmdline_row = msg_row; verbose_leave_scroll();
} }
#endif #endif
return file_path; return file_path;
@@ -4483,13 +4481,12 @@ ff_get_visited_list(filename, list_headp)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) if (p_verbose >= 5)
{ {
/* always scroll up, don't overwrite */ verbose_enter_scroll();
msg_scroll = TRUE;
smsg((char_u *)"ff_get_visited_list: FOUND list for %s", smsg((char_u *)"ff_get_visited_list: FOUND list for %s",
filename); filename);
/* don't overwrite this either */ /* don't overwrite this either */
msg_puts((char_u *)"\n"); msg_puts((char_u *)"\n");
cmdline_row = msg_row; verbose_leave_scroll();
} }
#endif #endif
return retptr; return retptr;
@@ -4501,12 +4498,11 @@ ff_get_visited_list(filename, list_headp)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) if (p_verbose >= 5)
{ {
/* always scroll up, don't overwrite */ verbose_enter_scroll();
msg_scroll = TRUE;
smsg((char_u *)"ff_get_visited_list: new list for %s", filename); smsg((char_u *)"ff_get_visited_list: new list for %s", filename);
/* don't overwrite this either */ /* don't overwrite this either */
msg_puts((char_u *)"\n"); msg_puts((char_u *)"\n");
cmdline_row = msg_row; verbose_leave_scroll();
} }
#endif #endif

View 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 \ test38.out test39.out test40.out test41.out test42.out \
test43.out test44.out test45.out test46.out test47.out \ test43.out test44.out test45.out test46.out test47.out \
test48.out test51.out test53.out test54.out test55.out \ test48.out test51.out test53.out test54.out test55.out \
test56.out test56.out test57.out
.SUFFIXES: .in .out .SUFFIXES: .in .out
@@ -100,3 +100,4 @@ test53.out: test53.in
test54.out: test54.in test54.out: test54.in
test55.out: test55.in test55.out: test55.in
test56.out: test56.in test56.out: test56.in
test57.out: test57.in

View File

@@ -18,7 +18,7 @@ SCRIPTS16 = test1.out test19.out test20.out test22.out \
test35.out test36.out test43.out \ test35.out test36.out test43.out \
test44.out test45.out test46.out test47.out \ test44.out test45.out test46.out test47.out \
test48.out test51.out test53.out test54.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 \ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test8.out test9.out test11.out test13.out test14.out \ test8.out test9.out test11.out test13.out test14.out \

View File

@@ -83,3 +83,5 @@ caught a:000[3]
['aa', '', 'bb'] ['aa', '', 'bb']
['', 'aa', '', 'bb', ''] ['', 'aa', '', 'bb', '']
['aa', '', 'bb', 'cc', ''] ['aa', '', 'bb', 'cc', '']
['a', 'b', 'c']
['', 'a', '', 'b', '', 'c', '']

52
src/testdir/test57.in Normal file
View File

@@ -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:

View File

@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA" #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 May 27)" #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 27, compiled " #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 May 31, compiled "