handle unicode in the prompt

Mentioned in #30.
This commit is contained in:
Gokcehan committed 2016-11-18 22:28:55 +03:00
1 parent d67054a000
commit 697a05cdd0
1 file changed
+2 -2
+2 -2
View File
@@ -669,8 +669,8 @@ func (ui *UI) prompt(nav *Nav, pref string) string {
win.printl(0, 0, fg, bg, pref)
win.print(len(pref), 0, fg, bg, string(lacc))
win.print(len(pref)+len(lacc), 0, fg, bg, string(racc))
termbox.SetCursor(win.x+len(pref)+len(lacc), win.y)
win.print(len(pref)+runeSliceWidth(lacc), 0, fg, bg, string(racc))
termbox.SetCursor(win.x+len(pref)+runeSliceWidth(lacc), win.y)
termbox.Flush()
default:
// TODO: handle other events