Skip to content

Commit

Permalink
Handle 0x7F for backspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Oct 5, 2020
1 parent cfa4724 commit 2ef6e8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,11 @@ func (o *Input) Focus() (text string, ok bool) {
o.CursorIndex--
o.Text = cut(o.Text, o.CursorIndex)
}
case tcell.KeyBackspace2:
if o.CursorIndex > 0 {
o.CursorIndex--
o.Text = cut(o.Text, o.CursorIndex)
}
case tcell.KeyLeft:
if o.CursorIndex > 0 {
o.CursorIndex--
Expand Down

0 comments on commit 2ef6e8c

Please sign in to comment.