Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quickhl_cword_enable_at_startup only work with the first buffer #16

Open
albertnetymk opened this issue Jul 13, 2017 · 2 comments
Open

Comments

@albertnetymk
Copy link

I have this let g:quickhl_cword_enable_at_startup = 1 in my vimrc, and I can see the highlight follows my cursor in test.txt if I launch vim using vim test.txt.

However, after opening another file in vim, like :e test1.txt, quickhl_cword seems only enable for the first buffer.

IMO, non-initial buffers should have auto-following highlight as well, if enable_at_startup is set.

@t9md
Copy link
Owner

t9md commented Jul 14, 2017

If that true, it's BUG.
I'm welcoming PR to fix this kind of BUG.
(I'm not actively using Vim recently)

@johnzeng
Copy link

This problem can be fixed by this

@@ -34,7 +34,7 @@ function! quickhl#cword#enable() "{{{
   let s:cword.enable = 1
   augroup QuickhlCword
     autocmd!
-    autocmd! CursorMoved <buffer> call quickhl#cword#refresh()
+    autocmd! CursorMoved * call quickhl#cword#refresh()
     autocmd! ColorScheme * call quickhl#cword#init_highlight()
   augroup END
   call quickhl#cword#init_highlight()

But I don't think it's a good idea to fix it, this plugin is affecting vim ui performance ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants