Fix ctrl-l interference with history search

Closes #12436
This commit is contained in:
Francisco Giordano
2026-02-08 17:36:00 -03:00
committed by Johannes Altmanninger
parent dc02a8ce35
commit 1f8cdf85b6
3 changed files with 20 additions and 0 deletions

View File

@@ -154,6 +154,20 @@ expect_prompt()
send("\x1b[A")
expect_re("echo TERM") # not ephemeral!
# Verify that ctrl-l preserves an active up-arrow history search
sendline("echo __ctrl_l_history_a")
expect_prompt("__ctrl_l_history_a")
sendline("echo __ctrl_l_history_b")
expect_prompt("__ctrl_l_history_b")
send("__ctrl_l_history")
send("\x1b[A")
expect_re("echo __ctrl_l_history_b")
send("\f")
send("\x1b[A")
expect_re("echo __ctrl_l_history_a")
sendline("")
expect_prompt("__ctrl_l_history_a")
# Verify that clear-session works as expected
# Note: This test depends on that history merge resets the session from history clear-sessions point of view.
sendline("builtin history clear")