Skip to content

visual mode re-highlight fix#55

Open
elbeardmorez wants to merge 1 commit intojunegunn:masterfrom
elbeardmorez:vis_hl_fix
Open

visual mode re-highlight fix#55
elbeardmorez wants to merge 1 commit intojunegunn:masterfrom
elbeardmorez:vis_hl_fix

Conversation

@elbeardmorez
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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