diff options
| author | Alin Mr <almr.oss@outlook.com> | 2024-05-03 13:48:11 +0000 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-05-03 17:17:40 +0200 |
| commit | 69dacf7f0e45b6e4fa0e6a20c01ae9caa55cb9e6 (patch) | |
| tree | 3abcb5620ca80a04c3b570d766fe16170a0f98b4 /init.lua | |
| parent | 56e65db9e0608555d1852fc546b482f6a93cfc80 (diff) | |
| download | vis-lockfiles-69dacf7f0e45b6e4fa0e6a20c01ae9caa55cb9e6.tar.gz vis-lockfiles-69dacf7f0e45b6e4fa0e6a20c01ae9caa55cb9e6.zip | |
init.lua: clean up on QUIT (handle :cq)
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -75,4 +75,13 @@ vis.events.subscribe(vis.events.FILE_CLOSE, function(file) end end) +vis.events.subscribe(vis.events.QUIT, function() + for _, lfile_path in pairs(created_locks) do + if lfile_path then + lockfiles.delete_lock_file(lfile_path) + end + end + created_locks = {} +end) + return M |
