diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-05-31 22:14:58 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-05-31 22:14:58 +0000 |
commit | 5c06f8b043e413d887ceb1af850ac7ba5034151e (patch) | |
tree | 0f7254afd8be58a253c6c73dc9e4711b2ad5bd3e /src | |
parent | a04f10b6066952725b53c3bda9ce259ab29a5e3b (diff) | |
download | vim-git-5c06f8b043e413d887ceb1af850ac7ba5034151e.tar.gz |
updated for version 7.0077
Diffstat (limited to 'src')
-rw-r--r-- | src/charset.c | 59 | ||||
-rw-r--r-- | src/ex_eval.c | 52 | ||||
-rw-r--r-- | src/gui_w32.c | 3 | ||||
-rw-r--r-- | src/if_cscope.c | 6 | ||||
-rw-r--r-- | src/misc2.c | 32 | ||||
-rw-r--r-- | src/testdir/Make_amiga.mak | 3 | ||||
-rw-r--r-- | src/testdir/Make_dos.mak | 2 | ||||
-rw-r--r-- | src/testdir/test55.ok | 2 | ||||
-rw-r--r-- | src/testdir/test57.in | 52 | ||||
-rw-r--r-- | src/version.h | 4 |
10 files changed, 166 insertions, 49 deletions
diff --git a/src/charset.c b/src/charset.c index c05a83d26..25680f677 100644 --- a/src/charset.c +++ b/src/charset.c @@ -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 diff --git a/src/ex_eval.c b/src/ex_eval.c index d6c4ebee7..485721b9c 100644 --- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -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(); + } } diff --git a/src/gui_w32.c b/src/gui_w32.c index e83ff4060..8d0a4cef0 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -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 diff --git a/src/if_cscope.c b/src/if_cscope.c index 1b0771337..9693f845d 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -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); diff --git a/src/misc2.c b/src/misc2.c index 879384a6d..a1e8c1272 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -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 diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak index b6d935042..cfe213473 100644 --- a/src/testdir/Make_amiga.mak +++ b/src/testdir/Make_amiga.mak @@ -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 diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak index f8816ec70..6ca1acc33 100644 --- a/src/testdir/Make_dos.mak +++ b/src/testdir/Make_dos.mak @@ -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 \ diff --git a/src/testdir/test55.ok b/src/testdir/test55.ok index 438a9f2ed..caec674bd 100644 --- a/src/testdir/test55.ok +++ b/src/testdir/test55.ok @@ -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 index 000000000..7e70169ce --- /dev/null +++ b/src/testdir/test57.in @@ -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: diff --git a/src/version.h b/src/version.h index ba96d655c..995acf449 100644 --- a/src/version.h +++ b/src/version.h @@ -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 " |