mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-15 23:53:18 +00:00
feat: refresh buffers when moving the change (#92)
This commit is contained in:
@@ -370,6 +370,7 @@ function M.edit()
|
||||
}, function(input)
|
||||
if input then
|
||||
runner.execute_command_async(string.format("jj edit %s", input), function()
|
||||
utils.reload_changed_file_buffers()
|
||||
M.log({})
|
||||
end, "Error editing change")
|
||||
else
|
||||
|
||||
@@ -408,6 +408,8 @@ function M.handle_log_edit(ignore_immut, close_on_exit)
|
||||
|
||||
-- Try to execute cmd
|
||||
runner.execute_command_async(cmd, function()
|
||||
utils.reload_changed_file_buffers()
|
||||
|
||||
-- Close the terminal buffer
|
||||
if close_on_exit then
|
||||
utils.notify(string.format("Editing change: `%s`", revset), vim.log.levels.INFO)
|
||||
@@ -828,6 +830,7 @@ function M.handle_summary_edit(revset, ignore_immut)
|
||||
end
|
||||
|
||||
runner.execute_command_async(cmd, function()
|
||||
utils.reload_changed_file_buffers()
|
||||
utils.notify(string.format("Editing revset: `%s`", revset), vim.log.levels.INFO)
|
||||
-- Open the file in the current window
|
||||
vim.cmd("edit " .. vim.fn.fnameescape(filepath.new_path))
|
||||
|
||||
Reference in New Issue
Block a user