Skip to content
Myr

Reduce flickering of the scroll info panel on the preview window

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 03d02d6 · Browse files · 1 file+8 added−0 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+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:src/terminal.go+8 added
1680 unmodified lines
16811682func (t *Terminal) renderPreviewText(height int, lines []string, lineNo int, unchanged bool) {1683 maxWidth := t.pwindow.Width()1684 var ansi *ansiState1685 spinnerRedraw := t.pwindow.Y() == 01686 for _, line := range lines {1687 var lbg tui.Color = -11688 if ansi != nil {1689 ansi.lbg = -1
3 unmodified lines
1693 t.previewed.filled = true1694 t.previewer.scrollable = true1695 break1696 } else if lineNo >= 0 {1697 if spinnerRedraw && lineNo > 0 {1698 spinnerRedraw = false1699 y := t.pwindow.Y()1700 x := t.pwindow.X()1701 t.renderPreviewSpinner()1702 t.pwindow.Move(y, x)1703 }1704 var fillRet tui.FillReturn1705 prefixWidth := 01706 _, _, ansi = extractColor(line, ansi, func(str string, ansi *ansiState) bool {1707 trimmed := []rune(str)
1653 unmodified lines