Skip to content

Commit

Permalink
feat: allow no timeout in config
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarriga committed Jun 16, 2022
1 parent 8960269 commit 6dabc96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/notify/windows/init.lua
Expand Up @@ -138,17 +138,16 @@ 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()
local buf_time = self.notif_bufs[win]:timeout() or self.config.default_timeout()
if buf_time ~= false then
if buf_time == true then
buf_time = nil
end
local timer = vim.loop.new_timer()
self.timers[win] = timer
local advance_time = buf_time or self.config.default_timeout()
timer:start(
advance_time,
advance_time,
buf_time,
buf_time,
vim.schedule_wrap(function()
timer:stop()
self.timers[win] = nil
Expand Down Expand Up @@ -261,6 +260,7 @@ function WindowAnimator:apply_updates()
win_updated = true
conf[field] = new_value
end

set_field("row", false)
set_field("col", false)
set_field("width", true)
Expand Down

0 comments on commit 6dabc96

Please sign in to comment.