fix(textinput): slicing outside cap (#532)

* textinput: fix slicing outside cap

* textinput: add test that makes slicing outside cap occur

* chore: tidy with gofmt

---------

Co-authored-by: bashbunni <bunni@bashbunni.dev>
This commit is contained in:
Mikael Fangel
2024-12-05 13:40:33 -08:00
committed by GitHub
co-authored by bashbunni
parent e5296a2b0f
commit 8624776d45
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -30,3 +30,10 @@ func Test_CurrentSuggestion(t *testing.T) {
t.Fatalf("Error: expected first suggestion but was %s", suggestion)
}
}
func Test_SlicingOutsideCap(t *testing.T) {
textinput := New()
textinput.Placeholder = "作業ディレクトリを指定してください"
textinput.Width = 32
textinput.View()
}