Fixed backspace bug
This commit is contained in:
7
typer.go
7
typer.go
@ -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:
|
||||
|
Reference in New Issue
Block a user