Revert changes to restore cursor position after undo

This feature is nice and desirable, but it was implemented in a intrusive way
by modifying the sequence of bytes we emit when running a command; this in
turn requires changing a bunch of tests.

This sequence hasn't changed in decades and the consequences of changing it
are hard to predict, given that it is likely terminal dependent; we've
already found a regression.

It's fine to reintroduce this but it should be done in a less intrusive way
(conceptually that seems straightforward - we're just remembering the cursor
position).

Revert "Fix spurious blank lines when executing scrolled commandline"

This reverts commit 0e512f8033.

Revert "On undo after execute, restore the cursor position "

This reverts commit 610338cc70.
This commit is contained in:
Peter Ammon
2025-03-05 16:32:52 -08:00
parent 30fa57022a
commit f2dde229aa
11 changed files with 56 additions and 121 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
from pexpect_helper import SpawnedProc, TO_END
from pexpect_helper import SpawnedProc
sp = SpawnedProc()
send, sendline, sleep, expect_prompt, expect_re, expect_str = (
@@ -17,7 +17,7 @@ def expect_read_prompt():
def expect_marker(text):
expect_prompt(TO_END + "@MARKER:" + str(text) + "@\\r\\n")
expect_prompt("\r\n.*@MARKER:" + str(text) + "@\\r\\n")
def print_var_contents(varname, expected):