Skip to content

Commit 8ecdbac

Browse files
committed
remove damage
1 parent 207baea commit 8ecdbac

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

rio-backend/src/crosswords/mod.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -556,33 +556,7 @@ impl<U: EventListener> Crosswords<U> {
556556
TermDamage::Partial(TermDamageIterator::new(&self.damage.lines, display_offset))
557557
}
558558

559-
/// Emit damage event based on current damage state
560-
pub fn emit_damage_event(&self) {
561-
let display_offset = self.grid.display_offset();
562-
let _damage = if self.damage.full {
563-
TerminalDamage::Full
564-
} else {
565-
// Collect damaged lines
566-
let damaged_lines: BTreeSet<LineDamage> = self
567-
.damage
568-
.lines
569-
.iter()
570-
.filter(|line| line.is_damaged())
571-
.map(|line| LineDamage::new(line.line + display_offset, true))
572-
.collect();
573559

574-
if damaged_lines.is_empty() {
575-
// Check if cursor moved
576-
if self.damage.last_cursor != self.grid.cursor.pos {
577-
TerminalDamage::CursorOnly
578-
} else {
579-
return; // No damage to emit
580-
}
581-
} else {
582-
TerminalDamage::Partial(damaged_lines)
583-
}
584-
};
585-
}
586560

587561
/// Peek damage event based on current damage state
588562
pub fn peek_damage_event(&self) -> Option<TerminalDamage> {
@@ -1241,21 +1215,7 @@ impl<U: EventListener> Crosswords<U> {
12411215
#[inline]
12421216
pub fn mark_line_damaged(&mut self, line: Line) {
12431217
let line_idx = line.0 as usize;
1244-
1245-
// Check if this line is already damaged
1246-
let was_damaged = if line_idx < self.damage.lines.len() {
1247-
self.damage.lines[line_idx].is_damaged()
1248-
} else {
1249-
false
1250-
};
1251-
12521218
self.damage.damage_line(line_idx);
1253-
1254-
// Only emit event if line wasn't already damaged
1255-
if !was_damaged {
1256-
let _damaged_line = LineDamage::new(line_idx, true);
1257-
// Event removed - damage is tracked internally
1258-
}
12591219
}
12601220

12611221
pub fn selection_to_string(&self) -> Option<String> {

rio-backend/src/performer/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,6 @@ where
219219
// For non-synchronized updates, we send a Wakeup event which will coalesce
220220
// multiple rapid updates into a single render pass.
221221
if state.parser.sync_bytes_count() < processed && processed > 0 {
222-
// Check if there's any damage to process
223-
// if terminal.peek_damage_event().is_some() {
224-
// terminal.emit_damage_event();
225222
tracing::trace!(
226223
"PTY read: Sending Wakeup event for {} bytes of non-sync data",
227224
processed

0 commit comments

Comments
 (0)