File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ function M.opts(state)
85
85
}
86
86
87
87
local position_auto = not opts .position or opts .position .col == " auto"
88
- if position_auto then
89
- if is_cmdline then
88
+ if is_cmdline then
89
+ if position_auto then
90
90
-- Anchor to the cmdline
91
91
local pos = Api .get_cmdline_position ()
92
92
if pos then
@@ -100,13 +100,15 @@ function M.opts(state)
100
100
opts .anchor = " SW"
101
101
end
102
102
end
103
- else
104
- opts .relative = { type = " cursor" }
105
- opts .position = {
106
- row = 1 ,
107
- col = - padding .left ,
108
- }
109
103
end
104
+ else
105
+ opts .relative = { type = " cursor" }
106
+ local border = vim .tbl_get (opts , " border" , " style" )
107
+ local offset = (border == nil or border == " none" ) and 0 or 1
108
+ opts .position = {
109
+ row = 1 + offset ,
110
+ col = - padding .left ,
111
+ }
110
112
end
111
113
112
114
-- manage left/right padding on the line
You can’t perform that action at this time.
0 commit comments