Fix some issues with unicode handling

There were unicode issues with prompts, search, and syntax highlighting,
which are now fixed.
This commit is contained in:
Zachary Yedidia
2016-08-18 08:14:33 -07:00
parent e4b6a931de
commit 8d230d2038
4 changed files with 7 additions and 5 deletions

View File

@@ -249,7 +249,7 @@ func (m *Messenger) HandleEvent(event tcell.Event, history []string) {
}
case tcell.KeyBackspace2, tcell.KeyBackspace:
if m.cursorx > 0 {
m.response = string([]rune(m.response)[:m.cursorx-1]) + string(m.response[m.cursorx:])
m.response = string([]rune(m.response)[:m.cursorx-1]) + string([]rune(m.response)[m.cursorx:])
m.cursorx--
}
case tcell.KeyRune: