forked from NotAShelf/beer
vt: honour synchronized output (DECSET 2026) with a present timeout
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I173dc842d89d96ea39154e1fde95be816a6a6964
This commit is contained in:
parent
f1c8271d31
commit
72044c21fd
3 changed files with 64 additions and 2 deletions
12
src/grid.rs
12
src/grid.rs
|
|
@ -151,6 +151,9 @@ pub struct Grid {
|
|||
selection: Option<(Point, Point)>,
|
||||
/// Bracketed paste mode (DECSET 2004): wrap pasted text in `ESC[200~`/`201~`.
|
||||
bracketed_paste: bool,
|
||||
/// Synchronized output (DECSET 2026): hold presentation while a frame is
|
||||
/// being assembled, so the screen never shows a half-drawn update.
|
||||
sync: bool,
|
||||
}
|
||||
|
||||
fn default_tabs(cols: usize) -> Vec<bool> {
|
||||
|
|
@ -185,6 +188,7 @@ impl Grid {
|
|||
app_cursor: false,
|
||||
selection: None,
|
||||
bracketed_paste: false,
|
||||
sync: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -882,6 +886,14 @@ impl Grid {
|
|||
self.bracketed_paste
|
||||
}
|
||||
|
||||
pub fn set_sync(&mut self, on: bool) {
|
||||
self.sync = on;
|
||||
}
|
||||
|
||||
pub fn sync_active(&self) -> bool {
|
||||
self.sync
|
||||
}
|
||||
|
||||
// --- inspection (logging + tests) ---
|
||||
|
||||
/// The visible text of one row, trailing blanks trimmed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue