diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-06 16:11:09 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-06 16:11:09 +0200 |
commit | fd29f4628ed53eef3d96a09ad2d0fa504edfcdfc (patch) | |
tree | 1a25451b5be6300da150cc4dca280bffe9d523ba /src/syntax.c | |
parent | 1950c3529b16acd21ee5770b422d633f24d192a3 (diff) | |
download | vim-git-fd29f4628ed53eef3d96a09ad2d0fa504edfcdfc.tar.gz |
Fixed: after ":ownsyntax perl" and ":e" syntax was cleared in other window.
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/syntax.c b/src/syntax.c index 2b70c6d45..038820923 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3421,6 +3421,21 @@ syntax_clear(block) } /* + * 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. */ static void @@ -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 |