junegunn / vim-peekaboo

:eyes: " / @ / CTRL-R
1.15k stars 38 forks source link

visual mode re-highlight fix #55

Open elbeardmorez opened 5 years ago

elbeardmorez commented 5 years ago

-switching from and then back to the peekaboo buffer via multiple wincmd p operations fails if the intermediate gv + redraw happens to trigger plugins which visit other windows -instead, record window number and reset following the operations -bug likely went unnoticed because the side-effects of latter buffer modifications aren't that noticeable. however, should the multiple wincmd p operations land you on a window with its buffer's modifiable=0 set, then a very visible:

E21: Cannot make changes,'modifiable' is off

error is presented, and the operation a user is attempting (e.g. "+y etc.) fails ..then you know about it!

elbeardmorez commented 5 years ago

I had to return to the issue again after my buffers started disappearing :smile: Some disbelief that it appeared fixed with the previous change potentially setting the wrong window to the peekaboo buffer too.

elbeardmorez commented 5 years ago

Updated commit message with a more palatable explanation - disabling vim-gitgutter makes this issue disappear for me. Hence the dilemma, should peekaboo rely on window order not changing, and complain that gitgutter doesn't restore state after its work is done? Or should peekaboo be slightly more defensive?!

Thanks for this plugin regardless of your decision.