diff options
| -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 |
