summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-02-02 23:07:25 +0000
committerBram Moolenaar <Bram@vim.org>2005-02-02 23:07:25 +0000
commit6ac5429d3b0860919333e38f1eb5b5617bf17314 (patch)
treebe466b5e7e9fc86107ff437c7346f528b325021d /src/ex_cmds2.c
parent748bf0374b1dd63e7e3157237185030c47ae0c2c (diff)
updated for version 7.0047
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index eac69b13cb..82557febb7 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1741,7 +1741,12 @@ ex_listdo(eap)
}
#if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
- au_event_restore(save_ei);
+ if (save_ei != NULL)
+ {
+ au_event_restore(save_ei);
+ apply_autocmds(EVENT_SYNTAX, curbuf->b_p_syn,
+ curbuf->b_fname, TRUE, curbuf);
+ }
#endif
}
@@ -2644,7 +2649,7 @@ get_one_sourceline(sp)
int have_read = FALSE;
/* use a growarray to store the sourced line */
- ga_init2(&ga, 1, 200);
+ ga_init2(&ga, 1, 250);
/*
* Loop until there is a finished line (or end-of-file).
@@ -2652,8 +2657,8 @@ get_one_sourceline(sp)
sourcing_lnum++;
for (;;)
{
- /* make room to read at least 80 (more) characters */
- if (ga_grow(&ga, 80) == FAIL)
+ /* make room to read at least 120 (more) characters */
+ if (ga_grow(&ga, 120) == FAIL)
break;
buf = (char_u *)ga.ga_data;
@@ -2669,7 +2674,7 @@ get_one_sourceline(sp)
if (fgets((char *)buf + ga.ga_len, ga.ga_maxlen - ga.ga_len,
sp->fp) == NULL)
break;
- len = (int)STRLEN(buf);
+ len = ga.ga_len + (int)STRLEN(buf + ga.ga_len);
#ifdef USE_CRNL
/* Ignore a trailing CTRL-Z, when in Dos mode. Only recognize the
* CTRL-Z by its own, or after a NL. */