Skip to content

Commit

Permalink
fix(rcarriga#189): correct the top-bottom slot limits
Browse files Browse the repository at this point in the history
Old implementation does not work properly because it -
1. overlaps the global statusline (off by 1 row), bottom limit
2. uses `tabline` option instead of `showtabline`, top limit
  • Loading branch information
dasupradyumna committed Nov 6, 2023
1 parent e4a2022 commit 419312b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/notify/stages/util.lua
Expand Up @@ -85,9 +85,9 @@ local function window_intervals(windows, direction, cmp)
end

function M.get_slot_range(direction)
local top = vim.opt.tabline:get() == "" and 0 or 1
local top = vim.opt.showtabline:get() == 0 and 0 or 1
local bottom = vim.opt.lines:get()
- (vim.opt.cmdheight:get() + (vim.opt.laststatus:get() > 0 and 1 or 0))
- (vim.opt.cmdheight:get() + (vim.opt.laststatus:get() > 0 and 1 or 0) + 1)
local left = 1
local right = vim.opt.columns:get()
if M.DIRECTION.TOP_DOWN == direction then
Expand Down

0 comments on commit 419312b

Please sign in to comment.