From f2d44ab5a793906457f3d3384f09af085096138d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 23 Aug 2020 17:17:57 +0900 Subject: [PATCH] Revert horizontal padding around preview window on "noborder" Use 2-space horizontal padding so that the preview content is aligned with the candidate list when the position of the preview window is `up` or `down`. --- src/terminal.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/terminal.go b/src/terminal.go index 2208cf4..d610c80 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -714,8 +714,8 @@ func (t *Terminal) resizeWindows() { } else { previewBorder := tui.MakeTransparentBorder() t.pborder = t.tui.NewWindow(y, x, w, h, true, previewBorder) - pwidth -= 2 - x += 1 + pwidth -= 4 + x += 2 } // 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