diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-05 11:06:50 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-05 11:06:50 +0900 |
commit | 9dee8edc0c5c4e0af0880694670e80340ece1386 (patch) | |
tree | 06f10beba531679e40869c36b43f30320a105014 | |
parent | f6aa28c380b5adda251fa9fe33dfb4a2ae721b1f (diff) |
Clear characters on 1-column margin after the preview window on the left
-rw-r--r-- | src/terminal.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/terminal.go b/src/terminal.go index 932553ed..d01a7eaa 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1452,6 +1452,14 @@ func (t *Terminal) resizeWindows(forcePreview bool) { // Add a 1-column margin between the preview window and the main window t.window = t.tui.NewWindow( marginInt[0], marginInt[3]+pwidth+1, width-pwidth-1, height, false, noBorder) + + // Clear characters on the margin + // fzf --bind 'space:preview(seq 100)' --preview-window left,1 + for y := 0; y < height; y++ { + t.window.Move(y, -1) + t.window.Print(" ") + } + createPreviewWindow(marginInt[0], marginInt[3], pwidth, height) } else { t.window = t.tui.NewWindow( |