mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 08:16: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();
|
state.mutex.lock();
|
||||||
defer state.mutex.unlock();
|
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: {
|
self.cursor_visible = visible: {
|
||||||
// If the cursor is explicitly not visible in the state,
|
// If the cursor is explicitly not visible in the state,
|
||||||
// then it is not visible.
|
// then it is not visible.
|
||||||
|
@ -709,6 +709,12 @@ pub fn render(
|
|||||||
state.mutex.lock();
|
state.mutex.lock();
|
||||||
defer state.mutex.unlock();
|
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: {
|
self.cursor_visible = visible: {
|
||||||
// If the cursor is explicitly not visible in the state,
|
// If the cursor is explicitly not visible in the state,
|
||||||
// then it is not visible.
|
// then it is not visible.
|
||||||
|
@ -29,7 +29,7 @@ const Coalesce = struct {
|
|||||||
|
|
||||||
/// The number of milliseconds before we reset the synchronized output flag
|
/// The number of milliseconds before we reset the synchronized output flag
|
||||||
/// if the running program hasn't already.
|
/// if the running program hasn't already.
|
||||||
const sync_reset_ms = 5000;
|
const sync_reset_ms = 1000;
|
||||||
|
|
||||||
/// Allocator used for some state
|
/// Allocator used for some state
|
||||||
alloc: std.mem.Allocator,
|
alloc: std.mem.Allocator,
|
||||||
|
Reference in New Issue
Block a user