-
-
Notifications
You must be signed in to change notification settings - Fork 89
fix(#189): correct the top-bottom slot limits #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
@@ -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() |
There was a problem hiding this comment.
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.
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 -
tabline
option instead ofshowtabline
, top limit