Skip to content

Commit

Permalink
Merge pull request #1067 from bhcleek/fix-sameids-change-buffer
Browse files Browse the repository at this point in the history
Clear most recent goSameId highlights groups
  • Loading branch information
fatih authored Oct 23, 2016
2 parents 0b63115 + a09d179 commit 42bc216
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ augroup vim-go
autocmd BufWritePre *.s call s:asmfmt_autosave()
autocmd BufWritePost *.go call s:metalinter_autosave()
autocmd BufNewFile *.go call s:template_autocreate()
" clear SameIds when the buffer is unloaded so that loading another buffer
" in the same window doesn't highlight the most recently matched
" identifier's positions.
autocmd BufWinEnter *.go call go#guru#ClearSameIds()
augroup END

" vim: sw=2 ts=2 et

0 comments on commit 42bc216

Please sign in to comment.