mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
implement erase display scrollback ("clear" command)
This commit is contained in:
@ -116,8 +116,6 @@ pub const RowIndex = union(RowIndexTag) {
|
|||||||
/// The index is from the top of the history (scrollback) to just
|
/// The index is from the top of the history (scrollback) to just
|
||||||
/// prior to the active area.
|
/// prior to the active area.
|
||||||
history: usize,
|
history: usize,
|
||||||
|
|
||||||
// TODO: others
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// The tags of RowIndex
|
/// The tags of RowIndex
|
||||||
|
@ -597,9 +597,15 @@ pub fn eraseDisplay(
|
|||||||
self.screen.cursor.pending_wrap = false;
|
self.screen.cursor.pending_wrap = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
else => {
|
.scrollback => {
|
||||||
log.err("unimplemented display mode: {}", .{mode});
|
const region = self.screen.region(.history);
|
||||||
@panic("unimplemented");
|
std.mem.set(Screen.Cell, region[0], self.screen.cursor.pen);
|
||||||
|
std.mem.set(Screen.Cell, region[1], self.screen.cursor.pen);
|
||||||
|
|
||||||
|
// TODO: move this logic to the Screen implementation
|
||||||
|
self.screen.top = self.screen.visible_offset;
|
||||||
|
self.screen.bottom = self.screen.bottom - self.screen.visible_offset;
|
||||||
|
self.screen.visible_offset = 0;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user