|
Karsten Hopp |
d9f6c9 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
d9f6c9 |
Subject: Patch 7.1.219
|
|
Karsten Hopp |
d9f6c9 |
Fcc: outbox
|
|
Karsten Hopp |
d9f6c9 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
d9f6c9 |
Mime-Version: 1.0
|
|
Karsten Hopp |
d9f6c9 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
d9f6c9 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
d9f6c9 |
------------
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
Patch 7.1.219 (after 7.1.215)
|
|
Karsten Hopp |
d9f6c9 |
Problem: synstack() returns situation after the current character, can't
|
|
Karsten Hopp |
d9f6c9 |
see the state for a one-character region.
|
|
Karsten Hopp |
d9f6c9 |
Solution: Don't update ending states in the requested column.
|
|
Karsten Hopp |
d9f6c9 |
Files: runtime/doc/eval.txt, src/eval.c, src/hardcopy.c,
|
|
Karsten Hopp |
d9f6c9 |
src/proto/syntax.pro, src/screen.c, src/spell.c, src/syntax.c
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/runtime/doc/eval.txt Thu Jan 10 22:23:22 2008
|
|
Karsten Hopp |
d9f6c9 |
--- runtime/doc/eval.txt Fri Jan 11 22:04:59 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 1,4 ****
|
|
Karsten Hopp |
d9f6c9 |
! *eval.txt* For Vim version 7.1. Last change: 2008 Jan 10
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
Karsten Hopp |
d9f6c9 |
--- 1,4 ----
|
|
Karsten Hopp |
d9f6c9 |
! *eval.txt* For Vim version 7.1. Last change: 2008 Jan 11
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 4967,4976 ****
|
|
Karsten Hopp |
d9f6c9 |
Return a |List|, which is the stack of syntax items at the
|
|
Karsten Hopp |
d9f6c9 |
position {lnum} and {col} in the current window. Each item in
|
|
Karsten Hopp |
d9f6c9 |
the List is an ID like what |synID()| returns.
|
|
Karsten Hopp |
d9f6c9 |
- The stack is the situation in between the character at "col"
|
|
Karsten Hopp |
d9f6c9 |
- and the next character. Note that a region of only one
|
|
Karsten Hopp |
d9f6c9 |
- character will not show up, it only exists inside that
|
|
Karsten Hopp |
d9f6c9 |
- character, not in between characters.
|
|
Karsten Hopp |
d9f6c9 |
The first item in the List is the outer region, following are
|
|
Karsten Hopp |
d9f6c9 |
items contained in that one. The last one is what |synID()|
|
|
Karsten Hopp |
d9f6c9 |
returns, unless not the whole item is highlighted or it is a
|
|
Karsten Hopp |
d9f6c9 |
--- 4970,4975 ----
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/src/eval.c Thu Jan 10 22:23:22 2008
|
|
Karsten Hopp |
d9f6c9 |
--- src/eval.c Fri Jan 11 21:46:12 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 15725,15731 ****
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
if (!transerr && lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
|
|
Karsten Hopp |
d9f6c9 |
&& col >= 0 && col < (long)STRLEN(ml_get(lnum)))
|
|
Karsten Hopp |
d9f6c9 |
! id = syn_get_id(curwin, lnum, (colnr_T)col, trans, NULL);
|
|
Karsten Hopp |
d9f6c9 |
#endif
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
rettv->vval.v_number = id;
|
|
Karsten Hopp |
d9f6c9 |
--- 15725,15731 ----
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
if (!transerr && lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
|
|
Karsten Hopp |
d9f6c9 |
&& col >= 0 && col < (long)STRLEN(ml_get(lnum)))
|
|
Karsten Hopp |
d9f6c9 |
! id = syn_get_id(curwin, lnum, (colnr_T)col, trans, NULL, FALSE);
|
|
Karsten Hopp |
d9f6c9 |
#endif
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
rettv->vval.v_number = id;
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 15874,15880 ****
|
|
Karsten Hopp |
d9f6c9 |
&& col >= 0 && col < (long)STRLEN(ml_get(lnum))
|
|
Karsten Hopp |
d9f6c9 |
&& rettv_list_alloc(rettv) != FAIL)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! (void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL);
|
|
Karsten Hopp |
d9f6c9 |
for (i = 0; ; ++i)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
id = syn_get_stack_item(i);
|
|
Karsten Hopp |
d9f6c9 |
--- 15874,15880 ----
|
|
Karsten Hopp |
d9f6c9 |
&& col >= 0 && col < (long)STRLEN(ml_get(lnum))
|
|
Karsten Hopp |
d9f6c9 |
&& rettv_list_alloc(rettv) != FAIL)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! (void)syn_get_id(curwin, lnum, (colnr_T)col, FALSE, NULL, TRUE);
|
|
Karsten Hopp |
d9f6c9 |
for (i = 0; ; ++i)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
id = syn_get_stack_item(i);
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/src/hardcopy.c Thu May 10 20:40:02 2007
|
|
Karsten Hopp |
d9f6c9 |
--- src/hardcopy.c Fri Jan 11 21:46:20 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 876,882 ****
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
if (psettings->do_syntax)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! id = syn_get_id(curwin, ppos->file_line, col, 1, NULL);
|
|
Karsten Hopp |
d9f6c9 |
if (id > 0)
|
|
Karsten Hopp |
d9f6c9 |
id = syn_get_final_id(id);
|
|
Karsten Hopp |
d9f6c9 |
else
|
|
Karsten Hopp |
d9f6c9 |
--- 876,882 ----
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
if (psettings->do_syntax)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! id = syn_get_id(curwin, ppos->file_line, col, 1, NULL, FALSE);
|
|
Karsten Hopp |
d9f6c9 |
if (id > 0)
|
|
Karsten Hopp |
d9f6c9 |
id = syn_get_final_id(id);
|
|
Karsten Hopp |
d9f6c9 |
else
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/src/proto/syntax.pro Thu Jan 10 22:23:22 2008
|
|
Karsten Hopp |
d9f6c9 |
--- src/proto/syntax.pro Fri Jan 11 21:54:19 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 4,10 ****
|
|
Karsten Hopp |
d9f6c9 |
void syn_stack_apply_changes __ARGS((buf_T *buf));
|
|
Karsten Hopp |
d9f6c9 |
void syntax_end_parsing __ARGS((linenr_T lnum));
|
|
Karsten Hopp |
d9f6c9 |
int syntax_check_changed __ARGS((linenr_T lnum));
|
|
Karsten Hopp |
d9f6c9 |
! int get_syntax_attr __ARGS((colnr_T col, int *can_spell));
|
|
Karsten Hopp |
d9f6c9 |
void syntax_clear __ARGS((buf_T *buf));
|
|
Karsten Hopp |
d9f6c9 |
void ex_syntax __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
d9f6c9 |
int syntax_present __ARGS((buf_T *buf));
|
|
Karsten Hopp |
d9f6c9 |
--- 4,10 ----
|
|
Karsten Hopp |
d9f6c9 |
void syn_stack_apply_changes __ARGS((buf_T *buf));
|
|
Karsten Hopp |
d9f6c9 |
void syntax_end_parsing __ARGS((linenr_T lnum));
|
|
Karsten Hopp |
d9f6c9 |
int syntax_check_changed __ARGS((linenr_T lnum));
|
|
Karsten Hopp |
d9f6c9 |
! int get_syntax_attr __ARGS((colnr_T col, int *can_spell, int keep_state));
|
|
Karsten Hopp |
d9f6c9 |
void syntax_clear __ARGS((buf_T *buf));
|
|
Karsten Hopp |
d9f6c9 |
void ex_syntax __ARGS((exarg_T *eap));
|
|
Karsten Hopp |
d9f6c9 |
int syntax_present __ARGS((buf_T *buf));
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 12,18 ****
|
|
Karsten Hopp |
d9f6c9 |
void set_context_in_echohl_cmd __ARGS((expand_T *xp, char_u *arg));
|
|
Karsten Hopp |
d9f6c9 |
void set_context_in_syntax_cmd __ARGS((expand_T *xp, char_u *arg));
|
|
Karsten Hopp |
d9f6c9 |
char_u *get_syntax_name __ARGS((expand_T *xp, int idx));
|
|
Karsten Hopp |
d9f6c9 |
! int syn_get_id __ARGS((win_T *wp, long lnum, colnr_T col, int trans, int *spellp));
|
|
Karsten Hopp |
d9f6c9 |
int syn_get_stack_item __ARGS((int i));
|
|
Karsten Hopp |
d9f6c9 |
int syn_get_foldlevel __ARGS((win_T *wp, long lnum));
|
|
Karsten Hopp |
d9f6c9 |
void init_highlight __ARGS((int both, int reset));
|
|
Karsten Hopp |
d9f6c9 |
--- 12,18 ----
|
|
Karsten Hopp |
d9f6c9 |
void set_context_in_echohl_cmd __ARGS((expand_T *xp, char_u *arg));
|
|
Karsten Hopp |
d9f6c9 |
void set_context_in_syntax_cmd __ARGS((expand_T *xp, char_u *arg));
|
|
Karsten Hopp |
d9f6c9 |
char_u *get_syntax_name __ARGS((expand_T *xp, int idx));
|
|
Karsten Hopp |
d9f6c9 |
! int syn_get_id __ARGS((win_T *wp, long lnum, colnr_T col, int trans, int *spellp, int keep_state));
|
|
Karsten Hopp |
d9f6c9 |
int syn_get_stack_item __ARGS((int i));
|
|
Karsten Hopp |
d9f6c9 |
int syn_get_foldlevel __ARGS((win_T *wp, long lnum));
|
|
Karsten Hopp |
d9f6c9 |
void init_highlight __ARGS((int both, int reset));
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/src/screen.c Thu Nov 8 21:23:34 2007
|
|
Karsten Hopp |
d9f6c9 |
--- src/screen.c Fri Jan 11 21:48:10 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 3885,3891 ****
|
|
Karsten Hopp |
d9f6c9 |
# ifdef FEAT_SPELL
|
|
Karsten Hopp |
d9f6c9 |
has_spell ? &can_spell :
|
|
Karsten Hopp |
d9f6c9 |
# endif
|
|
Karsten Hopp |
d9f6c9 |
! NULL);
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
if (did_emsg)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
--- 3885,3891 ----
|
|
Karsten Hopp |
d9f6c9 |
# ifdef FEAT_SPELL
|
|
Karsten Hopp |
d9f6c9 |
has_spell ? &can_spell :
|
|
Karsten Hopp |
d9f6c9 |
# endif
|
|
Karsten Hopp |
d9f6c9 |
! NULL, FALSE);
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
if (did_emsg)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/src/spell.c Sun Aug 5 18:32:21 2007
|
|
Karsten Hopp |
d9f6c9 |
--- src/spell.c Fri Jan 11 21:46:50 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 2146,2152 ****
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
col = (int)(p - buf);
|
|
Karsten Hopp |
d9f6c9 |
(void)syn_get_id(wp, lnum, (colnr_T)col,
|
|
Karsten Hopp |
d9f6c9 |
! FALSE, &can_spell);
|
|
Karsten Hopp |
d9f6c9 |
if (!can_spell)
|
|
Karsten Hopp |
d9f6c9 |
attr = HLF_COUNT;
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
--- 2146,2152 ----
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
col = (int)(p - buf);
|
|
Karsten Hopp |
d9f6c9 |
(void)syn_get_id(wp, lnum, (colnr_T)col,
|
|
Karsten Hopp |
d9f6c9 |
! FALSE, &can_spell, FALSE);
|
|
Karsten Hopp |
d9f6c9 |
if (!can_spell)
|
|
Karsten Hopp |
d9f6c9 |
attr = HLF_COUNT;
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/src/syntax.c Fri Jan 11 21:26:49 2008
|
|
Karsten Hopp |
d9f6c9 |
--- src/syntax.c Sat Jan 12 16:42:25 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 378,384 ****
|
|
Karsten Hopp |
d9f6c9 |
static int syn_stack_equal __ARGS((synstate_T *sp));
|
|
Karsten Hopp |
d9f6c9 |
static void validate_current_state __ARGS((void));
|
|
Karsten Hopp |
d9f6c9 |
static int syn_finish_line __ARGS((int syncing));
|
|
Karsten Hopp |
d9f6c9 |
! static int syn_current_attr __ARGS((int syncing, int displaying, int *can_spell));
|
|
Karsten Hopp |
d9f6c9 |
static int did_match_already __ARGS((int idx, garray_T *gap));
|
|
Karsten Hopp |
d9f6c9 |
static stateitem_T *push_next_match __ARGS((stateitem_T *cur_si));
|
|
Karsten Hopp |
d9f6c9 |
static void check_state_ends __ARGS((void));
|
|
Karsten Hopp |
d9f6c9 |
--- 378,384 ----
|
|
Karsten Hopp |
d9f6c9 |
static int syn_stack_equal __ARGS((synstate_T *sp));
|
|
Karsten Hopp |
d9f6c9 |
static void validate_current_state __ARGS((void));
|
|
Karsten Hopp |
d9f6c9 |
static int syn_finish_line __ARGS((int syncing));
|
|
Karsten Hopp |
d9f6c9 |
! static int syn_current_attr __ARGS((int syncing, int displaying, int *can_spell, int keep_state));
|
|
Karsten Hopp |
d9f6c9 |
static int did_match_already __ARGS((int idx, garray_T *gap));
|
|
Karsten Hopp |
d9f6c9 |
static stateitem_T *push_next_match __ARGS((stateitem_T *cur_si));
|
|
Karsten Hopp |
d9f6c9 |
static void check_state_ends __ARGS((void));
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 1691,1697 ****
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
while (!current_finished)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! (void)syn_current_attr(syncing, FALSE, NULL);
|
|
Karsten Hopp |
d9f6c9 |
/*
|
|
Karsten Hopp |
d9f6c9 |
* When syncing, and found some item, need to check the item.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
--- 1690,1696 ----
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
while (!current_finished)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! (void)syn_current_attr(syncing, FALSE, NULL, FALSE);
|
|
Karsten Hopp |
d9f6c9 |
/*
|
|
Karsten Hopp |
d9f6c9 |
* When syncing, and found some item, need to check the item.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 1731,1739 ****
|
|
Karsten Hopp |
d9f6c9 |
* done.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
int
|
|
Karsten Hopp |
d9f6c9 |
! get_syntax_attr(col, can_spell)
|
|
Karsten Hopp |
d9f6c9 |
colnr_T col;
|
|
Karsten Hopp |
d9f6c9 |
int *can_spell;
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
int attr = 0;
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
--- 1730,1739 ----
|
|
Karsten Hopp |
d9f6c9 |
* done.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
int
|
|
Karsten Hopp |
d9f6c9 |
! get_syntax_attr(col, can_spell, keep_state)
|
|
Karsten Hopp |
d9f6c9 |
colnr_T col;
|
|
Karsten Hopp |
d9f6c9 |
int *can_spell;
|
|
Karsten Hopp |
d9f6c9 |
+ int keep_state; /* keep state of char at "col" */
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
int attr = 0;
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 1768,1774 ****
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
while (current_col <= col)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! attr = syn_current_attr(FALSE, TRUE, can_spell);
|
|
Karsten Hopp |
d9f6c9 |
++current_col;
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
--- 1768,1775 ----
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
while (current_col <= col)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! attr = syn_current_attr(FALSE, TRUE, can_spell,
|
|
Karsten Hopp |
d9f6c9 |
! current_col == col ? keep_state : FALSE);
|
|
Karsten Hopp |
d9f6c9 |
++current_col;
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 1779,1788 ****
|
|
Karsten Hopp |
d9f6c9 |
* Get syntax attributes for current_lnum, current_col.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
static int
|
|
Karsten Hopp |
d9f6c9 |
! syn_current_attr(syncing, displaying, can_spell)
|
|
Karsten Hopp |
d9f6c9 |
int syncing; /* When 1: called for syncing */
|
|
Karsten Hopp |
d9f6c9 |
int displaying; /* result will be displayed */
|
|
Karsten Hopp |
d9f6c9 |
int *can_spell; /* return: do spell checking */
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
int syn_id;
|
|
Karsten Hopp |
d9f6c9 |
lpos_T endpos; /* was: char_u *endp; */
|
|
Karsten Hopp |
d9f6c9 |
--- 1780,1790 ----
|
|
Karsten Hopp |
d9f6c9 |
* Get syntax attributes for current_lnum, current_col.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
static int
|
|
Karsten Hopp |
d9f6c9 |
! syn_current_attr(syncing, displaying, can_spell, keep_state)
|
|
Karsten Hopp |
d9f6c9 |
int syncing; /* When 1: called for syncing */
|
|
Karsten Hopp |
d9f6c9 |
int displaying; /* result will be displayed */
|
|
Karsten Hopp |
d9f6c9 |
int *can_spell; /* return: do spell checking */
|
|
Karsten Hopp |
d9f6c9 |
+ int keep_state; /* keep syntax stack afterwards */
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
int syn_id;
|
|
Karsten Hopp |
d9f6c9 |
lpos_T endpos; /* was: char_u *endp; */
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 2298,2304 ****
|
|
Karsten Hopp |
d9f6c9 |
* may be for an empty match and a containing item might end in the
|
|
Karsten Hopp |
d9f6c9 |
* current column.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
! if (!syncing)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
check_state_ends();
|
|
Karsten Hopp |
d9f6c9 |
if (current_state.ga_len > 0
|
|
Karsten Hopp |
d9f6c9 |
--- 2300,2306 ----
|
|
Karsten Hopp |
d9f6c9 |
* may be for an empty match and a containing item might end in the
|
|
Karsten Hopp |
d9f6c9 |
* current column.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
! if (!syncing && !keep_state)
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
check_state_ends();
|
|
Karsten Hopp |
d9f6c9 |
if (current_state.ga_len > 0
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 6086,6097 ****
|
|
Karsten Hopp |
d9f6c9 |
* Function called for expression evaluation: get syntax ID at file position.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
int
|
|
Karsten Hopp |
d9f6c9 |
! syn_get_id(wp, lnum, col, trans, spellp)
|
|
Karsten Hopp |
d9f6c9 |
win_T *wp;
|
|
Karsten Hopp |
d9f6c9 |
long lnum;
|
|
Karsten Hopp |
d9f6c9 |
colnr_T col;
|
|
Karsten Hopp |
d9f6c9 |
! int trans; /* remove transparancy */
|
|
Karsten Hopp |
d9f6c9 |
! int *spellp; /* return: can do spell checking */
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
/* When the position is not after the current position and in the same
|
|
Karsten Hopp |
d9f6c9 |
* line of the same buffer, need to restart parsing. */
|
|
Karsten Hopp |
d9f6c9 |
--- 6088,6100 ----
|
|
Karsten Hopp |
d9f6c9 |
* Function called for expression evaluation: get syntax ID at file position.
|
|
Karsten Hopp |
d9f6c9 |
*/
|
|
Karsten Hopp |
d9f6c9 |
int
|
|
Karsten Hopp |
d9f6c9 |
! syn_get_id(wp, lnum, col, trans, spellp, keep_state)
|
|
Karsten Hopp |
d9f6c9 |
win_T *wp;
|
|
Karsten Hopp |
d9f6c9 |
long lnum;
|
|
Karsten Hopp |
d9f6c9 |
colnr_T col;
|
|
Karsten Hopp |
d9f6c9 |
! int trans; /* remove transparancy */
|
|
Karsten Hopp |
d9f6c9 |
! int *spellp; /* return: can do spell checking */
|
|
Karsten Hopp |
d9f6c9 |
! int keep_state; /* keep state of char at "col" */
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
/* When the position is not after the current position and in the same
|
|
Karsten Hopp |
d9f6c9 |
* line of the same buffer, need to restart parsing. */
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 6100,6106 ****
|
|
Karsten Hopp |
d9f6c9 |
|| col < current_col)
|
|
Karsten Hopp |
d9f6c9 |
syntax_start(wp, lnum);
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
! (void)get_syntax_attr(col, spellp);
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
return (trans ? current_trans_id : current_id);
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
--- 6103,6109 ----
|
|
Karsten Hopp |
d9f6c9 |
|| col < current_col)
|
|
Karsten Hopp |
d9f6c9 |
syntax_start(wp, lnum);
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
! (void)get_syntax_attr(col, spellp, keep_state);
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
return (trans ? current_trans_id : current_id);
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 6115,6122 ****
|
|
Karsten Hopp |
d9f6c9 |
syn_get_stack_item(i)
|
|
Karsten Hopp |
d9f6c9 |
int i;
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! if (i >= current_state.ga_len )
|
|
Karsten Hopp |
d9f6c9 |
return -1;
|
|
Karsten Hopp |
d9f6c9 |
return CUR_STATE(i).si_id;
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
#endif
|
|
Karsten Hopp |
d9f6c9 |
--- 6118,6131 ----
|
|
Karsten Hopp |
d9f6c9 |
syn_get_stack_item(i)
|
|
Karsten Hopp |
d9f6c9 |
int i;
|
|
Karsten Hopp |
d9f6c9 |
{
|
|
Karsten Hopp |
d9f6c9 |
! if (i >= current_state.ga_len)
|
|
Karsten Hopp |
d9f6c9 |
! {
|
|
Karsten Hopp |
d9f6c9 |
! /* Need to invalidate the state, because we didn't properly finish it
|
|
Karsten Hopp |
d9f6c9 |
! * for the last character, "keep_state" was TRUE. */
|
|
Karsten Hopp |
d9f6c9 |
! invalidate_current_state();
|
|
Karsten Hopp |
d9f6c9 |
! current_col = MAXCOL;
|
|
Karsten Hopp |
d9f6c9 |
return -1;
|
|
Karsten Hopp |
d9f6c9 |
+ }
|
|
Karsten Hopp |
d9f6c9 |
return CUR_STATE(i).si_id;
|
|
Karsten Hopp |
d9f6c9 |
}
|
|
Karsten Hopp |
d9f6c9 |
#endif
|
|
Karsten Hopp |
d9f6c9 |
*** ../vim-7.1.218/src/version.c Fri Jan 11 21:26:49 2008
|
|
Karsten Hopp |
d9f6c9 |
--- src/version.c Sat Jan 12 16:40:47 2008
|
|
Karsten Hopp |
d9f6c9 |
***************
|
|
Karsten Hopp |
d9f6c9 |
*** 668,669 ****
|
|
Karsten Hopp |
d9f6c9 |
--- 668,671 ----
|
|
Karsten Hopp |
d9f6c9 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
d9f6c9 |
+ /**/
|
|
Karsten Hopp |
d9f6c9 |
+ 219,
|
|
Karsten Hopp |
d9f6c9 |
/**/
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
--
|
|
Karsten Hopp |
d9f6c9 |
ARTHUR: Go on, Bors, chop its head off.
|
|
Karsten Hopp |
d9f6c9 |
BORS: Right. Silly little bleeder. One rabbit stew coming up.
|
|
Karsten Hopp |
d9f6c9 |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
d9f6c9 |
|
|
Karsten Hopp |
d9f6c9 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
d9f6c9 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
d9f6c9 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
d9f6c9 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|