diff --git a/pkg/gocui/text_area_test.go b/pkg/gocui/text_area_test.go index f0bc2fca81f..ff7843dd4b9 100644 --- a/pkg/gocui/text_area_test.go +++ b/pkg/gocui/text_area_test.go @@ -632,6 +632,26 @@ func TestTextArea(t *testing.T) { expectedCursor: 4, expectedClipboard: "def", }, + { + actions: func(textarea *TextArea) { + textarea.TypeString(`(abc)def`) + textarea.GoToStartOfLine() + textarea.ForwardDeleteWord() + }, + expectedContent: "abc)def", + expectedCursor: 0, + expectedClipboard: "(", + }, + { + actions: func(textarea *TextArea) { + textarea.TypeString(`abc)def`) + textarea.GoToStartOfLine() + textarea.ForwardDeleteWord() + }, + expectedContent: ")def", + expectedCursor: 0, + expectedClipboard: "abc", + }, { actions: func(textarea *TextArea) { textarea.TypeString(`abc`)