mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-15 01:01:15 -03:00
Ever since149594f974(Initial revision, 2005-09-20), we move the cursor to the end of the commandline just before executing it. This is so we can move the cursor to the line below the command line, so moving the cursor is relevant if one presses enter on say, the first line of a multi-line commandline. As mentioned in #10838 and others, it can be useful to restore the cursor position when recalling commandline from history. Make undo restore the position where enter was pressed, instead of implicitly moving the cursor to the end. This allows to quickly correct small mistakes in large commandlines that failed recently. This requires a new way of moving the cursor below the command line. Test changes include unrelated cleanup of history.py. (cherry picked from commit610338cc70) (cherry picked from commit0e512f8033)