fix(tasks): make sure we render after updating task output

This commit is contained in:
CJ van den Berg 2025-01-27 12:11:37 +01:00
parent c46d7c8d17
commit 8062923068
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -743,6 +743,7 @@ const cmds = struct {
if (self.get_active_editor()) |editor| if (editor.buffer) |eb| if (eb == buffer) { if (self.get_active_editor()) |editor| if (editor.buffer) |eb| if (eb == buffer) {
editor.move_buffer_end(.{}) catch {}; editor.move_buffer_end(.{}) catch {};
editor.insert_chars(command.fmt(.{output})) catch {}; editor.insert_chars(command.fmt(.{output})) catch {};
tui.need_render();
return; return;
}; };
var cursor: Buffer.Cursor = .{}; var cursor: Buffer.Cursor = .{};
@ -752,6 +753,7 @@ const cmds = struct {
_, _, root_ = try root_.insert_chars(cursor.row, cursor.col, output, self.allocator, metrics); _, _, root_ = try root_.insert_chars(cursor.row, cursor.col, output, self.allocator, metrics);
buffer.store_undo(&[_]u8{}) catch {}; buffer.store_undo(&[_]u8{}) catch {};
buffer.update(root_); buffer.update(root_);
tui.need_render();
} }
pub const shell_execute_stream_output_meta = .{ .arguments = &.{ .integer, .string } }; pub const shell_execute_stream_output_meta = .{ .arguments = &.{ .integer, .string } };
@ -765,6 +767,7 @@ const cmds = struct {
return; return;
}; };
buffer.mark_clean(); buffer.mark_clean();
tui.need_render();
} }
pub const shell_execute_stream_output_complete_meta = .{ .arguments = &.{ .integer, .string } }; pub const shell_execute_stream_output_complete_meta = .{ .arguments = &.{ .integer, .string } };