summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/syntax.c b/src/syntax.c
index aa393d7d6..65a792611 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -5992,7 +5992,8 @@ get_syntax_name(xp, idx)
* Function called for expression evaluation: get syntax ID at file position.
*/
int
-syn_get_id(lnum, col, trans, spellp)
+syn_get_id(wp, lnum, col, trans, spellp)
+ win_T *wp;
long lnum;
colnr_T col;
int trans; /* remove transparancy */
@@ -6000,10 +6001,10 @@ syn_get_id(lnum, col, trans, spellp)
{
/* When the position is not after the current position and in the same
* line of the same buffer, need to restart parsing. */
- if (curwin->w_buffer != syn_buf
+ if (wp->w_buffer != syn_buf
|| lnum != current_lnum
|| col < current_col)
- syntax_start(curwin, lnum);
+ syntax_start(wp, lnum);
(void)get_syntax_attr(col, spellp);