Fixed backspace bug

This commit is contained in:
Aetnaeus
2020-12-24 21:53:26 -05:00
parent cf0224be75
commit 0d80fcf494

@ -171,17 +171,14 @@ func (t *typer) start(s string, onStart func()) (nerrs int, ncorrect int, exitKe
break
}
if idx < len(text) {
text[idx].style = t.backgroundStyle
}
idx--
for idx > 0 && text[idx].c == '\n' {
text[idx].style = t.backgroundStyle
idx--
}
text[idx].style = t.backgroundStyle
t.highlight(text, idx, t.currentWordStyle, t.nextWordStyle)
}
case tcell.KeyRune: