feat/chore: rewrite git with job and some other fixes (#743)
* feat/chore: rewrite git with job and some other fixes * fix: fs clear window, rename echo_warning -> warn also fix renaming and add an event blocker to avoid running many events at the same time
This commit is contained in:
@@ -6,12 +6,16 @@ function M.path_to_matching_str(path)
|
||||
return path:gsub('(%-)', '(%%-)'):gsub('(%.)', '(%%.)'):gsub('(%_)', '(%%_)')
|
||||
end
|
||||
|
||||
function M.echo_warning(msg)
|
||||
function M.warn(msg)
|
||||
api.nvim_command('echohl WarningMsg')
|
||||
api.nvim_command("echom '[NvimTree] "..msg:gsub("'", "''").."'")
|
||||
api.nvim_command('echohl None')
|
||||
end
|
||||
|
||||
function M.str_find(haystack, needle)
|
||||
return vim.fn.stridx(haystack, needle) ~= -1
|
||||
end
|
||||
|
||||
function M.read_file(path)
|
||||
local fd = uv.fs_open(path, "r", 438)
|
||||
if not fd then return '' end
|
||||
|
||||
Reference in New Issue
Block a user