Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lua/notify/stages/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ 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
if vim.wo.winbar then
top = top + 1
end

local bottom = vim.opt.lines:get()
Copy link

@MatejBransky MatejBransky Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the MR title generally relates to improving the notification slot limit, I would like to add a proposal to consider incorporating the visible winbar, which is also impractically obscured by notifications.

Suggested change
local bottom = vim.opt.lines:get()
if vim.wo.winbar then
top = top + 1
end
local bottom = vim.opt.lines:get()

I'm not sure if this is the proper way to handle it. So I'll be glad for any suggestion for an improvement. 🙏

- (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 Expand Up @@ -168,7 +172,7 @@ function M.slot_after_previous(win, open_windows, direction)
return move_slot(
direction,
start,
cur_win_conf[space_key(direction)] + border_padding(direction, cur_win_conf)
cur_win_conf[space_key(direction)] + border_padding(direction, cur_win_conf) / 2
)
end

Expand Down