mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-17 07:43:39 -05:00
Better fix for #4465 - remove unnecessary erase
This commit is contained in:
@@ -2291,13 +2291,20 @@ func (t *Terminal) resizeWindows(forcePreview bool, redrawBorder bool) {
|
|||||||
innerMarginInt[0]+shift, innerMarginInt[3]+pwidth+m, innerWidth-pwidth-m, innerHeight-shrink, tui.WindowList, noBorder, true)
|
innerMarginInt[0]+shift, innerMarginInt[3]+pwidth+m, innerWidth-pwidth-m, innerHeight-shrink, tui.WindowList, noBorder, true)
|
||||||
|
|
||||||
// Clear characters on the margin
|
// Clear characters on the margin
|
||||||
// fzf --bind 'space:preview(seq 100)' --preview-window left,1
|
// fzf --bind 'space:toggle-preview' --preview ':' --preview-window left,1
|
||||||
if !hasListBorder {
|
if !hasListBorder {
|
||||||
for y := 0; y < innerHeight; y++ {
|
for y := 0; y < innerHeight; y++ {
|
||||||
t.window.Move(y, -1)
|
t.window.Move(y, -1)
|
||||||
t.window.Print(" ")
|
t.window.Print(" ")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// fzf --bind 'space:toggle-preview' --preview ':' --preview-window left,1,border-none
|
||||||
|
if !previewOpts.Border().HasRight() {
|
||||||
|
for y := 0; y < innerHeight; y++ {
|
||||||
|
t.window.Move(y, -2)
|
||||||
|
t.window.Print(" ")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
innerBorderFn(marginInt[0], marginInt[3]+pwidth, width-pwidth, height)
|
innerBorderFn(marginInt[0], marginInt[3]+pwidth, width-pwidth, height)
|
||||||
createPreviewWindow(marginInt[0], marginInt[3], pwidth, height)
|
createPreviewWindow(marginInt[0], marginInt[3], pwidth, height)
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ type BorderCharacter int
|
|||||||
func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle {
|
func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle {
|
||||||
if shape == BorderNone || shape == BorderPhantom {
|
if shape == BorderNone || shape == BorderPhantom {
|
||||||
return BorderStyle{
|
return BorderStyle{
|
||||||
shape: BorderRounded,
|
shape: BorderNone,
|
||||||
top: ' ',
|
top: ' ',
|
||||||
bottom: ' ',
|
bottom: ' ',
|
||||||
left: ' ',
|
left: ' ',
|
||||||
|
|||||||
Reference in New Issue
Block a user