Skip to content
Myr

Reduce flickering of the list when the list is truncated by --tail

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent c4a9ccd · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/terminal.go+1 added-1 removed
1980 unmodified lines
1981 // Avoid unnecessary redraw1982 newLine := itemLine{firstLine: line, cy: index + t.offset, current: current, selected: selected, label: label,1983 result: result, queryLen: len(t.input), width: 0, hasBar: line >= barRange[0] && line < barRange[1], minIndex: t.merger.minIndex}1984 prevLine := t.prevLines[line]1985 forceRedraw := prevLine.other || prevLine.firstLine != newLine.firstLine || prevLine.minIndex != t.merger.minIndex1985 forceRedraw := prevLine.other || prevLine.firstLine != newLine.firstLine1986 printBar := func(lineNum int, forceRedraw bool) bool {1987 return t.printBar(lineNum, forceRedraw, barRange)1988 }1989
2756 unmodified lines