lusty icon indicating copy to clipboard operation
lusty copied to clipboard

Lusty stops working when leaving its buffer with the mouse

Open rogutes opened this issue 12 years ago • 3 comments

I use ":set mouse=a".

  1. vim -c LustyBufferExplorer
  2. Click on the buffer I am editing.
  3. Press CTRL-W o.
  4. LustyBufferExplorer doesn't work any more.

This has accidentally happened several times and I couldn't figure out how to open Lusty without restarting vim.

rogutes avatar Apr 04 '12 12:04 rogutes

Thanks. I'd recommend not navigating away from the explorer window while it's in use. If you do navigate away, I'd recommend not using Ctrl-w o to close the explorer window; it's important to kill the explorer naturally, i.e. by going back to the window with Ctrl-w j or whatever, and then Ctrl-c.

The right thing to do is add a Vim autocmd to kill the explorer when its window is closed, but this is tricky to get right.

sjbach avatar Apr 04 '12 18:04 sjbach

Thanks for the explanation. Somewhere in the VIM User manual there is this sentence:

Frequently when you are typing, your fingers get ahead of your brain.

And this is exactly the problem: once I accidentally navigate away with the mouse, I automatically press Ctrl-w o (happened 3 times in the last month; could blame the touchpad of course). Isn't there a manual way to reopen the LustyExplorer window after such an "accident" (:unlet something)?

rogutes avatar Apr 05 '12 19:04 rogutes

Depending on your settings, you can reopen the buffer with :b, but it seems to be in an uncertain state at that point and I can't see how to make it close cleanly. It's really better to have it clean up after itself, as LustyExplorer sets some non-local options and remaps keys, so you're left with an unreliable environment. gross.

I agree that's not ideal, but I'd be more inclined to treat the cause rather than the symptoms. The plugin should close itself when its window is killed; someone just has to make it do that well. :-)

sjbach avatar Apr 05 '12 19:04 sjbach