diff --git a/src/options.go b/src/options.go index 11731b7..04fd736 100644 --- a/src/options.go +++ b/src/options.go @@ -336,6 +336,10 @@ func (o *previewOpts) HasBorderRight() bool { return o.border.HasRight() || o.border == tui.BorderLine && o.position == posLeft } +func (o *previewOpts) HasBorderTop() bool { + return o.border.HasTop() || o.border == tui.BorderLine && o.position == posDown +} + func defaultTmuxOptions(index int) *tmuxOptions { return &tmuxOptions{ position: posCenter, diff --git a/src/terminal.go b/src/terminal.go index 2723d9d..4acabf7 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -3231,7 +3231,7 @@ func (t *Terminal) renderPreviewScrollbar(yoff int, barLength int, barStart int) xshift = -1 } yshift := 1 - if !t.activePreviewOpts.border.HasTop() { + if !t.activePreviewOpts.HasBorderTop() { yshift = 0 } for i := yoff; i < height; i++ {