From be2ef16ddb86be798f76b476c94467b1575b7026 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Sun, 28 Aug 2022 10:01:57 -0700 Subject: [PATCH] fix: change default cursor-relative row/col to 0/0 Since the default anchor is SW, the previous default of 1/1 lead to the text under the cursor being occluded. --- lua/dressing/util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/dressing/util.lua b/lua/dressing/util.lua index addb187..39c8253 100644 --- a/lua/dressing/util.lua +++ b/lua/dressing/util.lua @@ -60,7 +60,7 @@ end M.calculate_col = function(relative, width, winid) if relative == "cursor" then - return 1 + return 0 else return math.floor((get_max_width(relative, winid) - width) / 2) end @@ -68,7 +68,7 @@ end M.calculate_row = function(relative, height, winid) if relative == "cursor" then - return 1 + return 0 else return math.floor((get_max_height(relative, winid) - height) / 2) end