From 75cf6abd55bfb60324fc47cf91eac08dbb8b87b4 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 8 Sep 2025 12:02:40 +0300 Subject: docs: move tmux documentation to its own file --- internal/hexaiaction/tui_delegate_test.go | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'internal/hexaiaction/tui_delegate_test.go') diff --git a/internal/hexaiaction/tui_delegate_test.go b/internal/hexaiaction/tui_delegate_test.go index 27881e4..4bdb359 100644 --- a/internal/hexaiaction/tui_delegate_test.go +++ b/internal/hexaiaction/tui_delegate_test.go @@ -1,32 +1,32 @@ package hexaiaction import ( - "bytes" - "regexp" - "testing" + "bytes" + "regexp" + "testing" - "github.com/charmbracelet/bubbles/list" + "github.com/charmbracelet/bubbles/list" ) func stripANSI(s string) string { - re := regexp.MustCompile(`\x1b\[[0-9;]*m`) - return re.ReplaceAllString(s, "") + re := regexp.MustCompile(`\x1b\[[0-9;]*m`) + return re.ReplaceAllString(s, "") } func TestOneLineDelegate_Render(t *testing.T) { - items := []list.Item{item{title: "Rewrite selection", kind: ActionRewrite, hotkey: 'r'}} - m := list.New(items, oneLineDelegate{}, 0, 0) - m.Select(0) - var b bytes.Buffer - oneLineDelegate{}.Render(&b, m, 0, items[0]) - out := stripANSI(b.String()) - if !regexp.MustCompile(`> \w`).MatchString(out) { - t.Fatalf("expected cursor prefix in %q", out) - } - if !regexp.MustCompile(`Rewrite selection`).MatchString(out) { - t.Fatalf("expected title in %q", out) - } - if !regexp.MustCompile(`\(r\)`).MatchString(out) { - t.Fatalf("expected hotkey in %q", out) - } + items := []list.Item{item{title: "Rewrite selection", kind: ActionRewrite, hotkey: 'r'}} + m := list.New(items, oneLineDelegate{}, 0, 0) + m.Select(0) + var b bytes.Buffer + oneLineDelegate{}.Render(&b, m, 0, items[0]) + out := stripANSI(b.String()) + if !regexp.MustCompile(`> \w`).MatchString(out) { + t.Fatalf("expected cursor prefix in %q", out) + } + if !regexp.MustCompile(`Rewrite selection`).MatchString(out) { + t.Fatalf("expected title in %q", out) + } + if !regexp.MustCompile(`\(r\)`).MatchString(out) { + t.Fatalf("expected hotkey in %q", out) + } } -- cgit v1.2.3