casouri / vundo

Visualize the undo tree.
413 stars 20 forks source link

Horizontal orientation usability #13

Closed indigoviolet closed 2 years ago

indigoviolet commented 2 years ago

A couple of issues I have noticed with the horizontal orientation of the tree:

1) For a long chain of changes, the last item in the chain doesn't show upon loading the vundo buffer in my setup, it requires a back-and-forth movement (notice the key cast in the modeline):

output-2022-03-25-17:16:36

2) A related problem, somewhat exacerbated by turning off the mode-line (which I patched for the screencast above, to show the keycast), is that I have no context on where I am in the tree, close to the beginning or the end.

casouri commented 2 years ago

Thanks for the feedback. This is a bit tricky. Is it like this every time you invoke vundo? I don't know the cause of the problem so I'm shooting in the dark, but could you try this:

(advice-add #'vundo :after (lambda () (redisplay)))

As for 2, what's the desired behavior in your mind? Maybe showing a scroll bar in the mode-line?

Also, I noticed that your vundo buffer occupies half of the screen, is that due to your configuration? Normally it should be only 3 lines high.

indigoviolet commented 2 years ago
  1. It turned out that the problem was with my configuration - I hadn't gotten around to excluding vundo from https://github.com/cyrus-and/zoom, but when I did so, the positioning fixed itself. Sorry for the false alarm!

  2. On further reflection I think this is probably not very important. You might consider allowing the mode-line to remain visible. If I were thinking wishfully, I would probably want to see a relative timestamp for the current node, but that information may not be captured in the undo system.

indigoviolet commented 2 years ago

Oh, and note that I had to do (setq window-size-fixed t) in my vundo mode hook to help it avoid zoom-mode. You might want to do that by default.

casouri commented 2 years ago

Thanks. I'll leave users to decide whether to fix their vundo window, maybe they want to see more branches temporarily.