Skip to content

Commit

Permalink
fix(windows): disable timeout
Browse files Browse the repository at this point in the history
See #112
  • Loading branch information
rcarriga committed Jul 2, 2022
1 parent 7caeaae commit 74ba257
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lua/notify/config/init.lua
Expand Up @@ -155,12 +155,12 @@ function Config.setup(custom_config)

function config.max_width()
return util.is_callable(user_config.max_width) and user_config.max_width()
or user_config.max_width
or user_config.max_width
end

function config.max_height()
return util.is_callable(user_config.max_height) and user_config.max_height()
or user_config.max_height
or user_config.max_height
end

local stages = config.stages()
Expand Down
3 changes: 2 additions & 1 deletion lua/notify/windows/init.lua
Expand Up @@ -138,7 +138,8 @@ end
function WindowAnimator:update_states(time, goals)
for win, win_goals in pairs(goals) do
if win_goals.time and not self.timers[win] then
local buf_time = self.notif_bufs[win]:timeout() or self.config.default_timeout()
local buf_time = self.notif_bufs[win]:timeout() == nil and self.config.default_timeout()
or self.notif_bufs[win]:timeout()
if buf_time ~= false then
if buf_time == true then
buf_time = nil
Expand Down

0 comments on commit 74ba257

Please sign in to comment.