diff --git a/src/renderer/Metal.zig b/src/renderer/Metal.zig index 245ead92e..501c98fe5 100644 --- a/src/renderer/Metal.zig +++ b/src/renderer/Metal.zig @@ -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. diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index cbd529760..b5c77db78 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -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. diff --git a/src/termio/Thread.zig b/src/termio/Thread.zig index 6f2a4af3f..0b345ac1f 100644 --- a/src/termio/Thread.zig +++ b/src/termio/Thread.zig @@ -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,