fix(#189): correct the top-bottom slot limits#228
Conversation
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
|
Can you check if this doesn't result in one extra row with |
|
Changing the following line nvim-notify/lua/notify/stages/util.lua Line 171 in e4a2022 @@ -163,17 +163,17 @@ function M.slot_after_previous(win, open_windows, direction)
if #preceding_wins == 0 then
local start = M.get_slot_range(direction)
if is_increasing(direction) then
return start
end
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 |
|
Status on this? Seems like a good improvement to me, the fact that it hides the statusline atm is annoying |
|
Sorry I've been a bit busy. I'll check what @jdujava has mentioned. |
|
I had the same issue as @jdujava with the extra line. I can confirm that adding both changes from @dasupradyumna and @jdujava fixes the notification position for |
| 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() |
There was a problem hiding this comment.
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.
| 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. 🙏
|
Apologies for the delay and thanks for the PR! |
Old implementation does not work properly because it -
tablineoption instead ofshowtabline, top limit