m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

Fix regression where tcell renderer not clearing the preview window

This commit is contained in:
Junegunn Choi
2023-11-02 21:00:07 +09:00
parent 21ab64e962
commit d0466fa777
4 changed files with 18 additions and 3 deletions

View File

@@ -1109,3 +1109,7 @@ func (w *LightWindow) Erase() {
w.FinishFill()
w.Move(0, 0)
}
func (w *LightWindow) EraseMaybe() bool {
return false
}

View File

@@ -555,6 +555,11 @@ func (w *TcellWindow) Erase() {
fill(w.left-1, w.top, w.width+1, w.height-1, w.normal, ' ')
}
func (w *TcellWindow) EraseMaybe() bool {
w.Erase()
return true
}
func (w *TcellWindow) Enclose(y int, x int) bool {
return x >= w.left && x < (w.left+w.width) &&
y >= w.top && y < (w.top+w.height)

View File

@@ -526,6 +526,7 @@ type Window interface {
Fill(text string) FillReturn
CFill(fg Color, bg Color, attr Attr, text string) FillReturn
Erase()
EraseMaybe() bool
}
type FullscreenRenderer struct {