Better handling for control-c with control-r search in the shell + update bubbletea

This commit is contained in:
David Dworken
2022-11-11 16:42:07 -08:00
parent 029bf27117
commit 6f53fdd41e
11 changed files with 53 additions and 14 deletions

View File

@ -2002,6 +2002,13 @@ func testControlR(t *testing.T, tester shellTester, shellName string, onlineStat
}
compareGoldens(t, out, "testControlR-InitialSearchNoResultsThenFoundResults")
// Search, hit control-c, and the table should be cleared
out = captureTerminalOutputWithShellName(t, tester, shellName, []string{"echo", "C-R", "c", "C-C"})
if strings.Contains(out, "\n\n\n") {
out = strings.TrimSpace(strings.Split(out, "\n\n\n")[1])
}
compareGoldens(t, out, "testControlR-ControlC-"+shellName)
// Disable control-r
_, _ = tester.RunInteractiveShellRelaxed(t, `hishtory config-set enable-control-r false`)
// And it shouldn't pop up