From ed1136bff9dcd4668b03e1cc264b94415d9fe431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Enrique=20Ram=C3=ADrez?= Date: Sat, 7 Mar 2026 22:11:29 +0100 Subject: [PATCH] fix(view): use `preview_opts.border` for offset calculation - use `vim.o.winborder` as fallback Reviewed-on: https://github.com/comfysage/artio.nvim/pull/20 --- lua/artio/view.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/artio/view.lua b/lua/artio/view.lua index 9a33183..51ebaa7 100644 --- a/lua/artio/view.lua +++ b/lua/artio/view.lua @@ -760,6 +760,7 @@ function View:previewconfig() and self.picker.win.preview_opts(self) local cmdheight = vim.api.nvim_win_get_height(ui2.wins.cmd) + local winborder = previewopts and previewopts.border or vim.o.winborder return vim.tbl_extend("force", { relative = "editor", width = vim.o.columns, @@ -767,7 +768,7 @@ function View:previewconfig() col = 0, row = vim.o.lines - (self.win.height + cmdheight) - - ((vim.o.winborder == "none" or vim.o.winborder == "") and 0 or 2) + - ((winborder == "none" or winborder == "") and 0 or 2) - (self.picker.win.hidestatusline and 0 or 1), }, previewopts or {}) end -- 2.51.2