diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-07-29 08:43:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-07-29 08:43:53 +0000 |
commit | 269ec658f0fad22b2bf9f71b06a4e6e10277f0e5 (patch) | |
tree | 450e57b10e8afd1c2a0c49e698a73d508781f67c /src | |
parent | 5eb86f91992f5291b8b472d3e1be1888508777e6 (diff) | |
download | vim-git-269ec658f0fad22b2bf9f71b06a4e6e10277f0e5.tar.gz |
updated for version 7.0013
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 1 | ||||
-rw-r--r-- | src/ex_cmds.c | 2 | ||||
-rw-r--r-- | src/ex_eval.c | 34 | ||||
-rw-r--r-- | src/ex_getln.c | 1 | ||||
-rw-r--r-- | src/gui.c | 2 | ||||
-rw-r--r-- | src/if_xcmdsrv.c | 5 | ||||
-rw-r--r-- | src/macros.h | 7 | ||||
-rw-r--r-- | src/option.c | 6 | ||||
-rw-r--r-- | src/os_mswin.c | 1 |
9 files changed, 37 insertions, 22 deletions
diff --git a/src/eval.c b/src/eval.c index 78513a230..4e6c7b6a5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -8065,6 +8065,7 @@ f_winrestcmd(argvars, retvar) # endif ++winnr; } + ga_append(&ga, NUL); retvar->var_val.var_string = ga.ga_data; #else diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 3a49b9a64..ba3670042 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -2203,6 +2203,7 @@ do_write(eap) buf_T *was_curbuf = curbuf; apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf); + apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, alt_buf); # ifdef FEAT_EVAL if (curbuf != was_curbuf || aborting()) # else @@ -2231,6 +2232,7 @@ do_write(eap) buf_name_changed(curbuf); #ifdef FEAT_AUTOCMD apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf); + apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, alt_buf); if (!alt_buf->b_p_bl) { alt_buf->b_p_bl = TRUE; diff --git a/src/ex_eval.c b/src/ex_eval.c index 921d60867..1386115e8 100644 --- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -1193,9 +1193,9 @@ ex_throw(eap) } /* - * Throw the current exception through the specified cstack. Common routine for - * ":throw" (user exception) and error and interrupt exceptions. Also used for - * rethrowing an uncaught exception. + * Throw the current exception through the specified cstack. Common routine + * for ":throw" (user exception) and error and interrupt exceptions. Also + * used for rethrowing an uncaught exception. */ void do_throw(cstack) @@ -1210,8 +1210,8 @@ do_throw(cstack) * conditional itself, so that its ACTIVE flag can be tested below. But * if a previous error or interrupt has not been converted to an exception, * inactivate the try conditional, too, as if the conversion had been done, - * and reset the did_emsg or got_int flag, so this won't happen again at the - * next surrounding try conditional. + * and reset the did_emsg or got_int flag, so this won't happen again at + * the next surrounding try conditional. */ if (did_emsg && !THROW_ON_ERROR) { @@ -1228,16 +1228,16 @@ do_throw(cstack) { /* * If this try conditional is active and we are before its first - * ":catch", set THROWN so that the ":catch" commands will check whether - * the exception matches. When the exception came from any of the - * catch clauses, it will be made pending at the ":finally" (if present) - * and rethrown at the ":endtry". This will also happen if the try - * conditional is inactive. This is the case when we are throwing an - * exception due to an error or interrupt on the way from a preceding - * ":continue", ":break", ":return", ":finish", error or interrupt (not - * converted to an exception) to the finally clause or from a preceding - * throw of a user or error or interrupt exception to the matching catch - * clause or the finally clause. + * ":catch", set THROWN so that the ":catch" commands will check + * whether the exception matches. When the exception came from any of + * the catch clauses, it will be made pending at the ":finally" (if + * present) and rethrown at the ":endtry". This will also happen if + * the try conditional is inactive. This is the case when we are + * throwing an exception due to an error or interrupt on the way from + * a preceding ":continue", ":break", ":return", ":finish", error or + * interrupt (not converted to an exception) to the finally clause or + * from a preceding throw of a user or error or interrupt exception to + * the matching catch clause or the finally clause. */ if (!(cstack->cs_flags[idx] & CSF_CAUGHT)) { @@ -1253,8 +1253,8 @@ do_throw(cstack) cstack->cs_exception[idx] = current_exception; } #if 0 - /* TODO: Add optimization below. Not yet done because of interface problems - * to eval.c and ex_cmds2.c. (Servatius) */ + /* TODO: Add optimization below. Not yet done because of interface + * problems to eval.c and ex_cmds2.c. (Servatius) */ else { /* diff --git a/src/ex_getln.c b/src/ex_getln.c index 7d1e28250..a541f0420 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -5476,6 +5476,7 @@ script_get(eap, cmd) ga_append(&ga, '\n'); vim_free(theline); } + ga_append(&ga, NUL); return (char_u *)ga.ga_data; } @@ -4586,12 +4586,14 @@ gui_do_findrepl(flags, find_text, repl_text, down) ga_concat(&ga, (char_u *)"/"); concat_esc(&ga, repl_text, '/'); /* escape slashes */ ga_concat(&ga, (char_u *)"/g"); + ga_append(&ga, NUL); do_cmdline_cmd(ga.ga_data); } else { /* Search for the next match. */ i = msg_scroll; + ga_append(&ga, NUL); do_search(NULL, down ? '/' : '?', ga.ga_data, 1L, SEARCH_MSG + SEARCH_MARK); msg_scroll = i; /* don't let an error message set msg_scroll */ diff --git a/src/if_xcmdsrv.c b/src/if_xcmdsrv.c index a82139e64..fb5999a54 100644 --- a/src/if_xcmdsrv.c +++ b/src/if_xcmdsrv.c @@ -683,6 +683,7 @@ serverGetVimNames(dpy) } if (regProp != empty_prop) XFree(regProp); + ga_append(&ga, NUL); return ga.ga_data; } @@ -1258,7 +1259,7 @@ serverEventProc(dpy, eventPtr) ga_append(&reply, 0); ga_concat(&reply, (char_u *)"-c 1"); } - ga_append(&reply, 0); + ga_append(&reply, NUL); (void)AppendPropCarefully(dpy, resWindow, commProperty, reply.ga_data, reply.ga_len); } @@ -1363,7 +1364,7 @@ serverEventProc(dpy, eventPtr) if ((r = ServerReplyFind(win, SROP_Add)) != NULL) { ga_concat(&(r->strings), str); - ga_append(&(r->strings), 0); + ga_append(&(r->strings), NUL); } #ifdef FEAT_AUTOCMD sprintf((char *)winstr, "0x%x", (unsigned int)win); diff --git a/src/macros.h b/src/macros.h index 6506aee87..43bddba32 100644 --- a/src/macros.h +++ b/src/macros.h @@ -159,7 +159,6 @@ # define mch_fopen(n, p) fopen((n), (p)) # endif # define mch_fstat(n, p) fstat((n), (p)) -# define mch_lstat(n, p) lstat((n), (p)) # ifdef MSWIN /* has it's own mch_stat() function */ # define mch_stat(n, p) vim_stat((n), (p)) # else @@ -173,6 +172,12 @@ # endif #endif +#ifdef HAVE_LSTAT +# define mch_lstat(n, p) lstat((n), (p)) +#else +# define mch_lstat(n, p) mch_stat((n), (p)) +#endif + #ifdef MACOS_CLASSIC /* MacOS classic doesn't support perm but MacOS X does. */ # define mch_open(n, m, p) open((n), (m)) diff --git a/src/option.c b/src/option.c index bcf418378..981e231ea 100644 --- a/src/option.c +++ b/src/option.c @@ -5312,11 +5312,13 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf, #ifdef FEAT_PRINTER else if (varp == &p_popt) - errmsg = parse_list_options(p_popt, printer_opts, OPT_PRINT_NUM_OPTIONS); + errmsg = parse_list_options(p_popt, printer_opts, + OPT_PRINT_NUM_OPTIONS); # if defined(FEAT_MBYTE) && defined(FEAT_POSTSCRIPT) else if (varp == &p_pmfn) - errmsg = parse_list_options(p_pmfn, mbfont_opts, OPT_MBFONT_NUM_OPTIONS); + errmsg = parse_list_options(p_pmfn, mbfont_opts, + OPT_MBFONT_NUM_OPTIONS); # endif #endif diff --git a/src/os_mswin.c b/src/os_mswin.c index d199f3e24..3ce61bc1d 100644 --- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -2689,6 +2689,7 @@ serverGetVimNames(void) ga_init2(&ga, 1, 100); EnumWindows(enumWindowsGetNames, (LPARAM)(&ga)); + ga_append(&ga, NUL); return ga.ga_data; } |