Skip to content

Commit 8ad6048

Browse files
committed
fix: double space between words bug
1 parent a9e1346 commit 8ad6048

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ui/text.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ func (t *Text) Type(r rune) {
8787
currentWord.Skip()
8888
}
8989

90-
if t.cursorPos < len(t.words)-1 {
90+
if t.cursorPos < len(t.words)-2 {
91+
currentWord.SetActive(false)
92+
t.cursorPos += 2
93+
t.words[t.cursorPos].SetActive(true)
94+
} else if t.cursorPos < len(t.words)-1 {
9195
currentWord.SetActive(false)
9296
t.cursorPos++
9397
t.words[t.cursorPos].SetActive(true)

0 commit comments

Comments
 (0)