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

visual mode re-highlight fix #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elbeardmorez
Copy link

@elbeardmorez elbeardmorez commented Apr 26, 2019

-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
Copy link
Author

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

-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
Copy link
Author

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.

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

Successfully merging this pull request may close these issues.

1 participant