fix(buffers): error "Process exited 0" on buf delete

main
bhagwan 2 years ago
parent c3b23be371
commit bb73779107

@ -238,12 +238,14 @@ M.vimcmd_buf = function(vimcmd, selected, opts)
utils.warn(("':%s' failed: %s"):format(cmd, res))
end
end
if curbuf ~= entry.bufnr or lnum ~= entry.line then
-- make sure we have valid column
entry.col = entry.col and entry.col>0 and entry.col or 1
vim.api.nvim_win_set_cursor(0, {tonumber(entry.line), tonumber(entry.col)-1})
if vimcmd ~= "bd" then
if curbuf ~= entry.bufnr or lnum ~= entry.line then
-- make sure we have valid column
entry.col = entry.col and entry.col>0 and entry.col or 1
vim.api.nvim_win_set_cursor(0, {tonumber(entry.line), tonumber(entry.col)-1})
end
if not is_term and not opts.no_action_zz then vim.cmd("norm! zvzz") end
end
if not is_term and not opts.no_action_zz then vim.cmd("norm! zvzz") end
end
end

Loading…
Cancel
Save