casouri / vundo

Visualize the undo tree.
413 stars 20 forks source link

Option to close the diff buffer when quitting #89

Closed ideasman42 closed 2 months ago

ideasman42 commented 6 months ago

Implement #88 outlined here.

Note this is off by default so there is no functional change unless vundo-diff-quit is enabled.


Note that I'm not sure if many users would want to keep the buffer open? The option could be removed and this could even be enabled by default.

ideasman42 commented 6 months ago

This may be of interest to @jdtsmith.

jdtsmith commented 6 months ago

I am mixed on whether the diff buffer should persist beyond a vundo session. It's quite easy to dismiss with q, but sometimes I find I want to refer to it even after vundo has been closed, for example if I'm pulling things out of it.

More comments inline.

ideasman42 commented 6 months ago

I am mixed on whether the diff buffer should persist beyond a vundo session. It's quite easy to dismiss with q, but sometimes I find I want to refer to it even after vundo has been closed, for example if I'm pulling things out of it.

As far as I can see both use cases are reasonable then, you may never want it too though, and in that case having to manually quit it every time is fairly annoying, you have to activate it to quit it so activating & quitting each time is enough of a hassle that I think it's good to be able to remove it.

jdtsmith commented 6 months ago

Reasonable points. I have a simpler approach in mind; I'll push a PR later, so let's hold off on this for now.

jdtsmith commented 6 months ago

See #92. I've switched the default to quit the window (but leave the buffer), but you can set vundo-diff-quit=kill to also kill the buffer.

jdtsmith commented 4 months ago

@ideasman42 can you check the new diff window close functionality and close this if it functions like you expected?

jdtsmith commented 2 months ago

I think this PR can be closed as the current release version includes this functionality (see vundo-diff-quit).