casouri / vundo

Visualize the undo tree.
413 stars 20 forks source link

Option to move cursor one character back? #99

Open mentalisttraceur opened 4 months ago

mentalisttraceur commented 4 months ago

Currently, the point is placed after the node glyph instead of before.

When using Emacs in some terminals, the cursor can't be hidden, and can't be restyled, especially not per-buffer (and doing it globally for the whole terminal usually makes for worse UX over-all).

One real-world example of where you basically have to use such a terminal is in on Android, in Termux. Technically that terminal supports some standard control sequences to restyle the cursor (neovim manages to do it), but Emacs doesn't seem to know how to do it? Anyway, for me this is a huge part of my daily Emacs usage.

So it's a super minor aesthetic issue, but it seems like some users would prefer it if a can't-be-hidden/changed box cursor displayed on the node rather than to its right.

mentalisttraceur commented 4 months ago

Screenshot_20240214-235846

Here's an example of what it ends up looking like currently (compact, Unicode glyphs, in Termux on Android).

I think some people would prefer this or would at least find it more intuitive:

Screenshot_20240215-000221

mentalisttraceur commented 4 months ago

Personally, I quickly got used to it and now I think I prefer it the way that it is.

But maybe we could give users a customizable variable to choose? Or maybe we can just figure out a function that users could add to one of the existing hooks to achieve this?

mentalisttraceur commented 4 months ago

(This might be related to #49 , but I don't have time to double-check right now, sorry.)

casouri commented 4 months ago

Makes sense, if someone care about this deeply enough and make a pr, I'm happy to merge it.