Skip to content

Commit

Permalink
fix: don't try to overlap tabline if it doesn't exist
Browse files Browse the repository at this point in the history
fix: cursorline hiding off by one
  • Loading branch information
willothy committed Feb 2, 2024
1 parent cea67c5 commit 5451bc0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/incline/winline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ function Winline:get_win_geom_row()
-- TODO(willothy): this can obviously be simplified a lot, there is a good bit of repetition
if vim.o.laststatus ~= 3 or a.nvim_win_get_position(self.target_win)[1] <= 1 then
if cw.margin.vertical.top == 0 then
if config.window.overlap.tabline then
if
config.window.overlap.tabline
-- don't try to overlap tabline if it doesn't exist
and (vim.o.showtabline > 1 or (vim.o.showtabline == 1 and #vim.api.nvim_list_tabpages() > 1))
then
return cw.margin.vertical.top - 1
-- only overlap winbar if it exists and is configured to overlap
elseif config.window.overlap.winbar or vim.wo[self.target_win].winbar == '' then
Expand Down

0 comments on commit 5451bc0

Please sign in to comment.