0
0
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:
Bram Moolenaar
2010-06-06 16:11:09 +02:00
parent 1950c3529b
commit fd29f4628e
6 changed files with 32 additions and 18 deletions

View File

@@ -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