Lusty stops working when leaving its buffer with the mouse #69

Open
rogutes opened this Issue Apr 4, 2012 · 3 comments

Comments

Projects
None yet
2 participants

rogutes commented Apr 4, 2012

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.

Owner

sjbach commented Apr 4, 2012

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.

rogutes commented Apr 5, 2012

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)?

Owner

sjbach commented Apr 5, 2012

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. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment