From 0d8359446c7572cbd5f0bdb59a0af8270999e3ce Mon Sep 17 00:00:00 2001 From: edyfox Date: Sun, 13 Jan 2008 17:28:18 +0000 Subject: [PATCH] Merged from the latest developing branch. git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/trunk@815 2a77ed30-b011-0410-a7ad-c7884a0aa172 --- src/ex_docmd.c | 9 +++++---- src/main.c | 6 ++++-- src/os_unix.c | 6 +++--- src/syntax.c | 25 ++++++++++++------------- src/version.c | 8 ++++++++ 5 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/ex_docmd.c b/src/ex_docmd.c index d7ef7d5c..6d036ff4 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3338,12 +3338,13 @@ set_one_cmd_context(xp, buff) } in_quote = !in_quote; } + /* An argument can contain just about everything, except + * characters that end the command and white space. */ + else if (c == '|' || c == '\n' || c == '"' || (vim_iswhite(c) #ifdef SPACE_IN_FILENAME - else if (!vim_isfilec_or_wc(c) - && (!(ea.argt & NOSPC) || usefilter)) -#else - else if (!vim_isfilec_or_wc(c)) + && (!(ea.argt & NOSPC) || usefilter) #endif + )) { while (*p != NUL) { diff --git a/src/main.c b/src/main.c index 45282ba5..07390a93 100644 --- a/src/main.c +++ b/src/main.c @@ -1775,7 +1775,8 @@ command_line_scan(parmp) case 'F': /* "-F" start in Farsi mode: rl + fkmap set */ #ifdef FEAT_FKMAP - curwin->w_p_rl = p_fkmap = TRUE; + p_fkmap = TRUE; + set_option_value((char_u *)"rl", 1L, NULL, 0); #else mch_errmsg(_(e_nofarsi)); mch_exit(2); @@ -1792,7 +1793,8 @@ command_line_scan(parmp) case 'H': /* "-H" start in Hebrew mode: rl + hkmap set */ #ifdef FEAT_RIGHTLEFT - curwin->w_p_rl = p_hkmap = TRUE; + p_hkmap = TRUE; + set_option_value((char_u *)"rl", 1L, NULL, 0); #else mch_errmsg(_(e_nohebrew)); mch_exit(2); diff --git a/src/os_unix.c b/src/os_unix.c index 9f13a0f7..2dbf5a5f 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -6145,9 +6145,9 @@ do_xterm_trace() if (xterm_trace == 1) { /* Get the hints just before tracking starts. The font size might - * have changed recently */ - XGetWMNormalHints(xterm_dpy, x11_window, &xterm_hints, &got_hints); - if (!(got_hints & PResizeInc) + * have changed recently. */ + if (!XGetWMNormalHints(xterm_dpy, x11_window, &xterm_hints, &got_hints) + || !(got_hints & PResizeInc) || xterm_hints.width_inc <= 1 || xterm_hints.height_inc <= 1) { diff --git a/src/syntax.c b/src/syntax.c index bc9f0324..5c2d1e4e 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -372,7 +372,7 @@ static void syn_stack_alloc __ARGS((void)); static int syn_stack_cleanup __ARGS((void)); static void syn_stack_free_entry __ARGS((buf_T *buf, synstate_T *p)); static synstate_T *syn_stack_find_entry __ARGS((linenr_T lnum)); -static synstate_T *store_current_state __ARGS((synstate_T *sp)); +static synstate_T *store_current_state __ARGS((void)); static void load_current_state __ARGS((synstate_T *from)); static void invalidate_current_state __ARGS((void)); static int syn_stack_equal __ARGS((synstate_T *sp)); @@ -464,7 +464,7 @@ syntax_start(wp, lnum) synstate_T *p; synstate_T *last_valid = NULL; synstate_T *last_min_valid = NULL; - synstate_T *sp, *prev; + synstate_T *sp, *prev = NULL; linenr_T parsed_lnum; linenr_T first_stored; int dist; @@ -502,7 +502,7 @@ syntax_start(wp, lnum) if (!current_state_stored) { ++current_lnum; - (void)store_current_state(NULL); + (void)store_current_state(); } /* @@ -558,7 +558,6 @@ syntax_start(wp, lnum) dist = 999999; else dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1; - prev = syn_stack_find_entry(current_lnum); while (current_lnum < lnum) { syn_start_line(); @@ -573,9 +572,13 @@ syntax_start(wp, lnum) * equal to the current state. If so, then validate all saved * states that depended on a change before the parsed line. */ if (prev == NULL) + prev = syn_stack_find_entry(current_lnum - 1); + if (prev == NULL) sp = syn_buf->b_sst_first; else - sp = prev->sst_next; + sp = prev; + while (sp != NULL && sp->sst_lnum < current_lnum) + sp = sp->sst_next; if (sp != NULL && sp->sst_lnum == current_lnum && syn_stack_equal(sp)) @@ -601,7 +604,7 @@ syntax_start(wp, lnum) else if (prev == NULL || current_lnum == lnum || current_lnum >= prev->sst_lnum + dist) - prev = store_current_state(prev); + prev = store_current_state(); } /* This can take a long time: break when CTRL-C pressed. The current @@ -1353,17 +1356,13 @@ syn_stack_find_entry(lnum) * The current state must be valid for the start of the current_lnum line! */ static synstate_T * -store_current_state(sp) - synstate_T *sp; /* at or before where state is to be saved or - NULL */ +store_current_state() { int i; synstate_T *p; bufstate_T *bp; stateitem_T *cur_si; - - if (sp == NULL) - sp = syn_stack_find_entry(current_lnum); + synstate_T *sp = syn_stack_find_entry(current_lnum); /* * If the current state contains a start or end pattern that continues @@ -1667,7 +1666,7 @@ syntax_check_changed(lnum) * Store the current state in b_sst_array[] for later use. */ ++current_lnum; - (void)store_current_state(NULL); + (void)store_current_state(); } } diff --git a/src/version.c b/src/version.c index b0a8494b..0ab42758 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,14 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 227, +/**/ + 226, +/**/ + 225, +/**/ + 224, +/**/ 223, /**/ 222, -- 2.11.4.GIT