diff --git a/ui.go b/ui.go index fa9de82..54c864b 100644 --- a/ui.go +++ b/ui.go @@ -840,9 +840,9 @@ func (ui *ui) draw(nav *nav) { right := ui.cmdAccRight ui.msgWin.printLine(ui.screen, 0, 0, st, ui.cmdPrefix) ui.msgWin.print(ui.screen, len(ui.cmdPrefix), 0, st, ui.msg) - ui.msgWin.print(ui.screen, len(ui.cmdPrefix)+len(ui.msg), 0, st, string(left)) - ui.msgWin.print(ui.screen, len(ui.cmdPrefix)+len(ui.msg)+runeSliceWidth(left), 0, st, string(right)) - ui.screen.ShowCursor(ui.msgWin.x+len(ui.cmdPrefix)+len(ui.msg)+runeSliceWidth(left), ui.msgWin.y) + ui.msgWin.print(ui.screen, len(ui.cmdPrefix)+printLength(ui.msg), 0, st, string(left)) + ui.msgWin.print(ui.screen, len(ui.cmdPrefix)+printLength(ui.msg)+runeSliceWidth(left), 0, st, string(right)) + ui.screen.ShowCursor(ui.msgWin.x+len(ui.cmdPrefix)+printLength(ui.msg)+runeSliceWidth(left), ui.msgWin.y) default: pos := min(runeSliceWidth(ui.cmdAccLeft), ui.msgWin.w-len(ui.cmdPrefix)-1) left := ui.cmdAccLeft[runeSliceWidth(ui.cmdAccLeft)-pos:]