From e8fa5c36c244dbd0318f8db2262ef1d7a5e16b89 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sat, 30 Nov 2024 18:21:47 -0800 Subject: [PATCH] feat: add ctrl-up/down bindings for history navigation --- aider/io.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aider/io.py b/aider/io.py index df6e71317..5cfdd2f18 100644 --- a/aider/io.py +++ b/aider/io.py @@ -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")