feat: add ctrl-up/down bindings for history navigation

This commit is contained in:
Paul Gauthier (aider) 2024-11-30 18:21:47 -08:00
parent a6e162c37a
commit e8fa5c36c2

View file

@ -418,6 +418,16 @@ class InputOutput:
"Ignore Ctrl when pressing space bar"
event.current_buffer.insert_text(" ")
@kb.add("c-up")
def _(event):
"Navigate backward through history"
event.current_buffer.history_backward()
@kb.add("c-down")
def _(event):
"Navigate forward through history"
event.current_buffer.history_forward()
@kb.add("escape", "c-m", eager=True)
def _(event):
event.current_buffer.insert_text("\n")