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`.
This commit is contained in:
Junegunn Choi 2020-08-23 17:17:57 +09:00
parent 43798fc2e8
commit f2d44ab5a7
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -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