Skip to content

Commit

Permalink
Fix syncing the colors of a buffer when it is open in multiple tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Stemen authored and Kyle Stemen committed Dec 16, 2017
1 parent 1f7faaf commit c39f121
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions autoload/coquille.vim
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,16 @@ function! coquille#SyncWindowColors(winid, hint_tabnr, hint_winnr)
let l:cur_win = winnr()
let l:cur_winid = coquille#WinGetId(l:cur_tab, l:cur_win)
call coquille#WinGoToId(a:winid, l:tabwin[0], l:tabwin[1])
let l:cur_tab2 = tabpagenr()
let l:cur_win2 = winnr()
endif
" Switching the window could have triggered the colors to get synced.
" So double check that they need to be synced.
let l:win_value = coquille#GetWinVar(a:winid, tabpagenr(), winnr(),
\ l:group, [s:empty_range, -1])
if l:win_value[0] == l:buf_value
" It already matches; nothing to do
continue
endif
if l:win_value[1] != -1
call matchdelete(l:win_value[1])
Expand Down

0 comments on commit c39f121

Please sign in to comment.