m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-15 23:03:47 -05:00

Add --preview-window noborder option to disable preview border

Close #1699
This commit is contained in:
Junegunn Choi
2019-11-15 11:37:52 +09:00
parent d2fa470165
commit e24299239e
4 changed files with 16 additions and 4 deletions

View File

@@ -624,7 +624,11 @@ func (t *Terminal) resizeWindows() {
noBorder := tui.MakeBorderStyle(tui.BorderNone, t.unicode)
if previewVisible {
createPreviewWindow := func(y int, x int, w int, h int) {
t.pborder = t.tui.NewWindow(y, x, w, h, tui.MakeBorderStyle(tui.BorderAround, t.unicode))
previewBorder := noBorder
if t.preview.border {
previewBorder = tui.MakeBorderStyle(tui.BorderAround, t.unicode)
}
t.pborder = t.tui.NewWindow(y, x, w, h, previewBorder)
pwidth := w - 4
// ncurses auto-wraps the line when the cursor reaches the right-end of
// the window. To prevent unintended line-wraps, we use the width one