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/window.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/window.c')
-rw-r--r-- | src/window.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/window.c b/src/window.c index e878d9fab..239a8094e 100644 --- a/src/window.c +++ b/src/window.c @@ -1176,7 +1176,8 @@ win_init(newp, oldp, flags) newp->w_buffer = oldp->w_buffer; #ifdef FEAT_SYN_HL - newp->w_s = oldp->w_s; + /* TODO: use reference count? */ + newp->w_s = &(oldp->w_buffer->b_s); #endif oldp->w_buffer->b_nwindows++; newp->w_cursor = oldp->w_cursor; @@ -4408,18 +4409,13 @@ win_free(wp, tp) #endif /* FEAT_GUI */ #ifdef FEAT_SYN_HL - /* free independent synblock */ - if (wp->w_s != &wp->w_buffer->b_s) - { - syntax_clear(wp->w_s); - vim_free(wp->w_s); - } + reset_synblock(wp); /* free independent synblock */ #endif #ifdef FEAT_AUTOCMD if (wp != aucmd_win) #endif - win_remove(wp, tp); + win_remove(wp, tp); vim_free(wp); #ifdef FEAT_AUTOCMD |