fix: avoid spamming the differ on every vcs_content frame
This commit is contained in:
parent
1190c99212
commit
3c9cf07f9d
2 changed files with 3 additions and 0 deletions
|
|
@ -2605,5 +2605,6 @@ pub fn process_git_response(self: *Self, parent: tp.pid_ref, m: tp.message) (Out
|
|||
} else if (try m.match(.{ tp.any, tp.extract(&context), "cat_file", tp.null_ })) {
|
||||
const request: *VcsContentRequest = @ptrFromInt(context);
|
||||
defer request.deinit();
|
||||
parent.send(.{ "PRJ", "vcs_content", request.file_path, request.vcs_id, null }) catch {};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1976,6 +1976,8 @@ pub fn vcs_content_update(self: *Self, m: tp.message) void {
|
|||
if (m.match(.{ "PRJ", "vcs_content", tp.extract(&file_path), tp.extract(&vcs_id), tp.extract(&content) }) catch return) {
|
||||
const buffer = self.buffer_manager.get_buffer_for_file(file_path) orelse return;
|
||||
buffer.set_vcs_content(vcs_id, content) catch {};
|
||||
} else if (m.match(.{ "PRJ", "vcs_content", tp.extract(&file_path), tp.extract(&vcs_id), tp.null_ }) catch return) {
|
||||
const buffer = self.buffer_manager.get_buffer_for_file(file_path) orelse return;
|
||||
if (self.get_editor_for_buffer(buffer)) |editor|
|
||||
editor.vcs_content_update() catch {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue