mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
renderer: do not render if synchronized output is on
This commit is contained in:
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user