deadpixi / tine

tine - a modern clone of the AmigaDOS/TRIPOS ED display editor
GNU General Public License v3.0
60 stars 6 forks source link

Ctrl-N then Undo (Esc u Enter) moves cursor #8

Open drj11 opened 1 year ago

drj11 commented 1 year ago

Undoing a join puts the cursor just before the split point (the end of the first line that participated in the join). Regardless of where the cursor was.

Again, i can't tell if this is faithful to AmigaDOS or not, but it seems wrong even if it is faithful. I suppose undo in general should either put the cursor back to where it was or not move it at all.

To reproduce:

I've no idea what should happen morally, but it seems that the most tine thing to do would be to not move the cursor at all.

by the way, it did surprise me that Ctrl-N join did not put the cursor at the join point, but i suppose that's intentional.

deadpixi commented 1 year ago

ED has no undo once a line has been inserted/deleted/moved away from, so we’re free to choose the behavior here.

The non-motion of the cursor upon join is, IIRC, the behavior of ED. Now I gotta go check.