renderer: do not render if synchronized output is on

This commit is contained in:
Mitchell Hashimoto
2023-08-28 11:38:11 -07:00
parent 2cc1e43716
commit 5168dc7645
3 changed files with 13 additions and 1 deletions

View File

@ -467,6 +467,12 @@ pub fn render(
state.mutex.lock();
defer state.mutex.unlock();
// If we're in a synchronized output state, we pause all rendering.
if (state.terminal.modes.get(.synchronized_output)) {
log.debug("synchronized output started, skipping render", .{});
return;
}
self.cursor_visible = visible: {
// If the cursor is explicitly not visible in the state,
// then it is not visible.

View File

@ -709,6 +709,12 @@ pub fn render(
state.mutex.lock();
defer state.mutex.unlock();
// If we're in a synchronized output state, we pause all rendering.
if (state.terminal.modes.get(.synchronized_output)) {
log.debug("synchronized output started, skipping render", .{});
return;
}
self.cursor_visible = visible: {
// If the cursor is explicitly not visible in the state,
// then it is not visible.

View File

@ -29,7 +29,7 @@ const Coalesce = struct {
/// The number of milliseconds before we reset the synchronized output flag
/// if the running program hasn't already.
const sync_reset_ms = 5000;
const sync_reset_ms = 1000;
/// Allocator used for some state
alloc: std.mem.Allocator,