fix: send the latest file content each time (#1879)
This commit is contained in:
@@ -148,6 +148,7 @@ function M.func(opts, on_log, on_complete, session_ctx)
|
||||
on_complete(false, "User canceled")
|
||||
return
|
||||
end
|
||||
if session_ctx then Helpers.mark_as_not_viewed(opts.path, session_ctx) end
|
||||
on_complete(true, nil)
|
||||
end,
|
||||
})
|
||||
@@ -163,6 +164,7 @@ function M.func(opts, on_log, on_complete, session_ctx)
|
||||
end
|
||||
vim.api.nvim_buf_set_lines(bufnr, start_line - 1, end_line, false, new_lines)
|
||||
vim.api.nvim_buf_call(bufnr, function() vim.cmd("noautocmd write") end)
|
||||
if session_ctx then Helpers.mark_as_not_viewed(opts.path, session_ctx) end
|
||||
on_complete(true, nil)
|
||||
end, { focus = not Config.behaviour.auto_focus_on_diff_view }, session_ctx)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user