From f306566602d2eae39428864b8e8b14934d32e708 Mon Sep 17 00:00:00 2001 From: verse91 Date: Sat, 11 Apr 2026 23:56:36 +0700 Subject: [PATCH] fix(root): ctrl R open reverse search instead of switching to history --- root/root.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/root/root.go b/root/root.go index 6784715..72bf652 100644 --- a/root/root.go +++ b/root/root.go @@ -300,7 +300,15 @@ func runWrapper() { b := inputSlice[i] intercepted := false - if overlay.Visible && (b == '\r' || b == 0x09) { + if b == 0x12 { // ctrl+r + intercepted = true + if mode == "spec" { + mode = "history" + } else { + mode = "spec" + } + shouldOverlayDraw = true + } else if overlay.Visible && (b == '\r' || b == 0x09) { intercepted = true selected := overlay.Items[overlay.Cursor].Cmd os.Stdout.Write([]byte(overlay.ClearAndDisable())) @@ -343,13 +351,7 @@ func runWrapper() { } switch b { - case 0x12: // ctrl+r - if mode == "spec" { - mode = "history" - } else { - mode = "spec" - } - shouldOverlayDraw = true + case 0x09: // tab if !overlay.Visible { shouldOverlayDraw = true