Skip to content

Commit

Permalink
Add fix for junegunn#1526
Browse files Browse the repository at this point in the history
  • Loading branch information
bitterfox committed Mar 13, 2021
1 parent fd2a2a9 commit b8c9a34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/terminal.go
Expand Up @@ -1087,7 +1087,7 @@ func (t *Terminal) printItem(result Result, line int, i int, current bool) {
return
}

t.move(line, 0, false)
t.move(line, 0, true)
if current {
if len(label) == 0 {
t.window.CPrint(tui.ColCurrentCursorEmpty, t.pointerEmpty)
Expand All @@ -1113,10 +1113,6 @@ func (t *Terminal) printItem(result Result, line int, i int, current bool) {
}
newLine.width = t.printHighlighted(result, tui.ColNormal, tui.ColMatch, false, true)
}
fillSpaces := prevLine.width - newLine.width
if fillSpaces > 0 {
t.window.Print(strings.Repeat(" ", fillSpaces))
}
t.prevLines[i] = newLine
}

Expand Down
2 changes: 1 addition & 1 deletion src/tui/light.go
Expand Up @@ -944,7 +944,7 @@ func (w *LightWindow) Fill(text string) FillReturn {
}

func (w *LightWindow) CFill(fg Color, bg Color, attr Attr, text string) FillReturn {
w.Move(w.posy, w.posx)
w.MoveAndClear(w.posy, w.posx)
if fg == colDefault {
fg = w.fg
}
Expand Down

0 comments on commit b8c9a34

Please sign in to comment.