diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-05-04 10:55:57 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-05-04 11:31:16 +0200 |
| commit | 1c0074fbaa825fcb03bca6876636e6a7abaca7f4 (patch) | |
| tree | 5358339ab2aec14e76d3f04ea4e29412bc13dd1c /init.lua | |
| parent | 92d9548e6ffb5ed2d263aacadf3bd899ce289655 (diff) | |
| download | vis-lockfiles-1c0074fbaa825fcb03bca6876636e6a7abaca7f4.tar.gz vis-lockfiles-1c0074fbaa825fcb03bca6876636e6a7abaca7f4.zip | |
remove obsolete event handling code
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 27 |
1 files changed, 1 insertions, 26 deletions
@@ -17,21 +17,6 @@ local script_path = source_str:match('(.*/)') local lockfiles = dofile(script_path .. 'lockfiles.lua') --- function used for all actions resulting from a FILE_OPEN event that can not --- be done during the handler -local pending_action = nil - ---[[ -local function count_windows() - -- Count the currently open vis windows - local n = 0 - for _ in vis:windows() do - n = n + 1 - end - return n -end -]] -- - local M = {} M.directory = '${XDG_STATE_HOME:-${HOME}/.local/state}/vis/locks' M.directory_expanded = nil @@ -45,7 +30,7 @@ local function get_lock_dir() end -- get a user confirmation --- return true if user selected yes, false otherwise +-- return true if user wants to edit the locked file local function prompt(path, lfile_path, pid) local choices = 'a\ne\nq' local msg = 'Lock file found!\n\t lock file: "' .. lfile_path .. '"\n\tfile name: ' .. path .. @@ -111,14 +96,4 @@ vis.events.subscribe(vis.events.QUIT, function() created_locks = {} end) -vis.events.subscribe(vis.events.UI_DRAW, function() - if not pending_action or not vis.win then - return - end - - if pending_action() then - pending_action = nil - end -end) - return M |
