rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
2.91k stars 74 forks source link

fix(#189): correct the top-bottom slot limits #228

Open dasupradyumna opened 8 months ago

dasupradyumna commented 8 months ago

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
jdujava commented 7 months ago

Can you check if this doesn't result in one extra row with stages = 'fade_in_slide_out'? (It does for my setup.)

jdujava commented 7 months ago

Changing the following line https://github.com/rcarriga/nvim-notify/blob/e4a2022f4fec2d5ebc79afa612f96d8b11c627b3/lua/notify/stages/util.lua#L171 seems to fix the problem:

@@ -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
isak102 commented 5 months ago

Status on this? Seems like a good improvement to me, the fact that it hides the statusline atm is annoying

dasupradyumna commented 5 months ago

Sorry I've been a bit busy. I'll check what @jdujava has mentioned.

nullromo commented 5 months ago

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 fade, slide, static, and fade_in_slide_out. With these two changes in place, my notifications always come up without overlapping the statusline and with no additional space.