From 0a70e3a824487895614d41a92ad752441e334843 Mon Sep 17 00:00:00 2001 From: kyu08 <49891479+kyu08@users.noreply.github.com> Date: Sun, 12 Jul 2026 20:22:35 +0900 Subject: [PATCH] Add missing test cases `newCursorForMoveRightWord()` --- pkg/gocui/text_area_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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`)