File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ M.schema = Schema(function(s)
33
33
overlap = {
34
34
winbar = s :entry (false , vx .bool ),
35
35
tabline = s :entry (false , vx .bool ),
36
+ borders = s :entry (false , vx .bool ),
36
37
},
37
38
placement = {
38
39
vertical = s :entry (' top' , vx .any { ' top' , ' bottom' }),
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ function Winline:get_win_geom_row()
68
68
if placement .vertical == ' top' then
69
69
-- if margin-top is 0, avoid overlapping tabline, and avoid overlapping
70
70
-- statusline if laststatus is not 3
71
+
72
+ -- TODO(willothy): this can obviously be simplified a lot, there is a good bit of repetition
71
73
if vim .o .laststatus ~= 3 or a .nvim_win_get_position (self .target_win )[1 ] <= 1 then
72
74
if cw .margin .vertical .top == 0 then
73
75
if config .window .overlap .tabline then
@@ -85,7 +87,14 @@ function Winline:get_win_geom_row()
85
87
return cw .margin .vertical .top
86
88
end
87
89
end
88
- return cw .margin .vertical .top - 1
90
+ -- only overlap border if user has set it
91
+ if config .window .overlap .borders then
92
+ return cw .margin .vertical .top - 1
93
+ elseif config .window .overlap .winbar == false and vim .wo [self .target_win ].winbar ~= ' ' then
94
+ return cw .margin .vertical .top + 1
95
+ else
96
+ return cw .margin .vertical .top
97
+ end
89
98
elseif placement .vertical == ' bottom' then
90
99
return a .nvim_win_get_height (self .target_win ) - cw .margin .vertical .bottom
91
100
end
You can’t perform that action at this time.
0 commit comments