mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 11:29:01 +00:00
Reduce flickering of the scroll info panel on the preview window
This commit is contained in:
parent
03d02d67f7
commit
ee5cdb9713
@ -1682,6 +1682,7 @@ func (t *Terminal) renderPreviewArea(unchanged bool) {
|
|||||||
func (t *Terminal) renderPreviewText(height int, lines []string, lineNo int, unchanged bool) {
|
func (t *Terminal) renderPreviewText(height int, lines []string, lineNo int, unchanged bool) {
|
||||||
maxWidth := t.pwindow.Width()
|
maxWidth := t.pwindow.Width()
|
||||||
var ansi *ansiState
|
var ansi *ansiState
|
||||||
|
spinnerRedraw := t.pwindow.Y() == 0
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
var lbg tui.Color = -1
|
var lbg tui.Color = -1
|
||||||
if ansi != nil {
|
if ansi != nil {
|
||||||
@ -1693,6 +1694,13 @@ func (t *Terminal) renderPreviewText(height int, lines []string, lineNo int, unc
|
|||||||
t.previewer.scrollable = true
|
t.previewer.scrollable = true
|
||||||
break
|
break
|
||||||
} else if lineNo >= 0 {
|
} else if lineNo >= 0 {
|
||||||
|
if spinnerRedraw && lineNo > 0 {
|
||||||
|
spinnerRedraw = false
|
||||||
|
y := t.pwindow.Y()
|
||||||
|
x := t.pwindow.X()
|
||||||
|
t.renderPreviewSpinner()
|
||||||
|
t.pwindow.Move(y, x)
|
||||||
|
}
|
||||||
var fillRet tui.FillReturn
|
var fillRet tui.FillReturn
|
||||||
prefixWidth := 0
|
prefixWidth := 0
|
||||||
_, _, ansi = extractColor(line, ansi, func(str string, ansi *ansiState) bool {
|
_, _, ansi = extractColor(line, ansi, func(str string, ansi *ansiState) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user