mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
Fixed: after ":ownsyntax perl" and ":e" syntax was cleared in other window.
This commit is contained in:
16
src/syntax.c
16
src/syntax.c
@@ -3420,6 +3420,21 @@ syntax_clear(block)
|
||||
invalidate_current_state();
|
||||
}
|
||||
|
||||
/*
|
||||
* Get rid of ownsyntax for window "wp".
|
||||
*/
|
||||
void
|
||||
reset_synblock(wp)
|
||||
win_T *wp;
|
||||
{
|
||||
if (wp->w_s != &wp->w_buffer->b_s)
|
||||
{
|
||||
syntax_clear(wp->w_s);
|
||||
vim_free(wp->w_s);
|
||||
wp->w_s = &wp->w_buffer->b_s;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear syncing info for one buffer.
|
||||
*/
|
||||
@@ -3538,7 +3553,6 @@ syn_cmd_clear(eap, syncing)
|
||||
if (curwin->w_s == &curwin->w_buffer->b_s)
|
||||
do_unlet((char_u *)"b:current_syntax", TRUE);
|
||||
do_unlet((char_u *)"w:current_syntax", TRUE);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user