fix: Empty trigger_events crash the plugin (#33)

This commit is contained in:
Toni Müller
2023-07-21 08:33:55 +02:00
committed by GitHub
parent 473aea9d6f
commit 48f69fb61d
2 changed files with 38 additions and 27 deletions
+3
View File
@@ -12,8 +12,11 @@ Config = {
cleaning_interval = 1250, -- (milliseconds) automatically clean MsgArea after displaying `message`. See :h MsgArea
},
trigger_events = { -- See :h events
--- @type nil|string[]
immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
--- @type nil|string[]
defer_save = { "InsertLeave", "TextChanged" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
--- @type nil|string[]
cancel_defered_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
},
-- function that takes the buffer handle and determines whether to save the current buffer or not