Purpose

Idealistic Undo and Redo should restore the original state, exactly as it were. But under certain conditions such exact restoration is impossible. Example: resizing the window.

What does it take to make horizontal movement user-friendly?

Scroll Left

Move cursor one to the left... let view be locked.

t0
01
23
t01 scroll_left
a typical scroll left operation.
t1
0
123
t12 undo (scroll_left)
everything will be restored, exactly as it were before.
t2
01
23
t23 redo (scroll_left)
you will not be able to tell the difference, wheter scroll_left or redo occured.
t3
0
123

Dealing with begining of line is problematic, as you can see:

t0
0
123
t01 scroll_left
a non-typical scroll left operation. Preservation is NOT possible.
t1
0123
t12 undo (scroll_left)
everything will be restored, exactly as it were before.
t2
0
123
t23 redo (scroll_left)
you will not be able to tell the difference, wheter scroll_left or redo occured.
t3
0123

Scroll Right

Move cursor one to the right... let view be locked.

t0
01
234
t01 scroll_right
a typical scroll right operation.
t1
012
34
t12 undo (scroll_right)
everything will be restored, exactly as it were before.
t2
01
234
t23 redo (scroll_right)
you will not be able to tell the difference, wheter scroll_right or redo occured.
t3
012
34

dealing with end of line

t0
01
2
t01 scroll_right
a non-typical scroll right operation.
t1
012
t12 undo (scroll_right)
everything will be restored, exactly as it were before.
t2
01
2
t23 redo (scroll_right)
you will not be able to tell the difference, wheter scroll_right or redo occured.
t3
012

Move Home

Place cursor just before the first character on the line.

t0
01
23
t01 move_end
a typical move_home operation.
t1
0123
t12 undo (move_home)
everything will be restored, exactly as it were before.
t2
01
23
t23 redo (move_home)
you will not be able to tell the difference, wheter move_home or redo occured.
t3
0123

Move End

Place cursor right after the last character on the line.

t0
01
23
t01 move_end
a typical move_end operation.
t1
0123
t12 undo (move_end)
everything will be restored, exactly as it were before.
t2
01
23
t23 redo (move_end)
you will not be able to tell the difference, wheter move_end or redo occured.
t3
0123

Conclusion

No conclusion yet.