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.
This commit is contained in:
Steven Arcangeli 2022-08-28 10:01:57 -07:00
parent 96b09a0e3c
commit be2ef16ddb
1 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ end
M.calculate_col = function(relative, width, winid) M.calculate_col = function(relative, width, winid)
if relative == "cursor" then if relative == "cursor" then
return 1 return 0
else else
return math.floor((get_max_width(relative, winid) - width) / 2) return math.floor((get_max_width(relative, winid) - width) / 2)
end end
@ -68,7 +68,7 @@ end
M.calculate_row = function(relative, height, winid) M.calculate_row = function(relative, height, winid)
if relative == "cursor" then if relative == "cursor" then
return 1 return 0
else else
return math.floor((get_max_height(relative, winid) - height) / 2) return math.floor((get_max_height(relative, winid) - height) / 2)
end end