File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,21 @@ 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
- if cw .margin .vertical .top == 0 and (vim .o .laststatus ~= 3 or a .nvim_win_get_position (self .target_win )[1 ] <= 1 ) then
72
- if config .window .overlap .tabline then
73
- return - 1
71
+ if vim .o .laststatus ~= 3 or a .nvim_win_get_position (self .target_win )[1 ] <= 1 then
72
+ if cw .margin .vertical .top == 0 then
73
+ if config .window .overlap .tabline then
74
+ return cw .margin .vertical .top - 1
75
+ -- only overlap winbar if it exists and is configured to overlap
76
+ elseif config .window .overlap .winbar or vim .wo [self .target_win ].winbar == ' ' then
77
+ return cw .margin .vertical .top
78
+ else
79
+ return cw .margin .vertical .top + 1
80
+ end
81
+ -- ensure we skip the winbar if we are overlapping it
74
82
elseif config .window .overlap .winbar or vim .wo [self .target_win ].winbar == ' ' then
75
- return 0
83
+ return cw . margin . vertical . top - 1
76
84
else
77
- return 1
85
+ return cw . margin . vertical . top
78
86
end
79
87
end
80
88
return cw .margin .vertical .top - 1
You can’t perform that action at this time.
0 commit comments