fix: fs refresh override refresh clock
This commit is contained in:
@@ -38,7 +38,7 @@ local function create_file(file)
|
||||
luv.fs_chmod(file, 420)
|
||||
luv.fs_close(fd)
|
||||
events._dispatch_file_created(file)
|
||||
lib.refresh_tree()
|
||||
lib.refresh_tree(true)
|
||||
focus_file(file)
|
||||
end
|
||||
end))
|
||||
@@ -99,7 +99,7 @@ function M.create(node)
|
||||
if idx == num_entries then
|
||||
events._dispatch_folder_created(abs_path)
|
||||
api.nvim_out_write('Folder '..abs_path..' was properly created\n')
|
||||
lib.refresh_tree()
|
||||
lib.refresh_tree(true)
|
||||
end
|
||||
else
|
||||
create_file(abs_path)
|
||||
@@ -237,7 +237,7 @@ local function do_paste(node, action_type, action_fn)
|
||||
end
|
||||
|
||||
clipboard[action_type] = {}
|
||||
return lib.refresh_tree()
|
||||
return lib.refresh_tree(true)
|
||||
end
|
||||
|
||||
local function add_to_clipboard(node, clip)
|
||||
@@ -274,7 +274,7 @@ function M.remove(node)
|
||||
events._dispatch_file_removed(node.absolute_path)
|
||||
clear_buffer(node.absolute_path)
|
||||
end
|
||||
lib.refresh_tree()
|
||||
lib.refresh_tree(true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -296,7 +296,7 @@ function M.rename(with_sub)
|
||||
api.nvim_out_write(node.absolute_path..' ➜ '..new_name..'\n')
|
||||
rename_loaded_buffers(node.absolute_path, new_name)
|
||||
events._dispatch_node_renamed(abs_path, new_name)
|
||||
lib.refresh_tree()
|
||||
lib.refresh_tree(true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user