mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
comments
This commit is contained in:
@ -152,6 +152,9 @@ pub const Action = union(enum) {
|
|||||||
/// Clear the screen. This also clears all scrollback.
|
/// Clear the screen. This also clears all scrollback.
|
||||||
clear_screen: void,
|
clear_screen: void,
|
||||||
|
|
||||||
|
/// Select all text on the screen.
|
||||||
|
select_all: void,
|
||||||
|
|
||||||
/// Scroll the screen varying amounts.
|
/// Scroll the screen varying amounts.
|
||||||
scroll_to_top: void,
|
scroll_to_top: void,
|
||||||
scroll_to_bottom: void,
|
scroll_to_bottom: void,
|
||||||
@ -223,8 +226,6 @@ pub const Action = union(enum) {
|
|||||||
/// Quit ghostty
|
/// Quit ghostty
|
||||||
quit: void,
|
quit: void,
|
||||||
|
|
||||||
select_all: void,
|
|
||||||
|
|
||||||
pub const CursorKey = struct {
|
pub const CursorKey = struct {
|
||||||
normal: []const u8,
|
normal: []const u8,
|
||||||
application: []const u8,
|
application: []const u8,
|
||||||
|
@ -1392,6 +1392,8 @@ pub fn clear(self: *Screen, mode: ClearMode) !void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the selection for all contents on the screen. Surrounding
|
||||||
|
/// whitespace is omitted. If there is no selection, this returns null.
|
||||||
pub fn selectAll(self: *Screen) ?Selection {
|
pub fn selectAll(self: *Screen) ?Selection {
|
||||||
const whitespace = &[_]u32{ 0, ' ', '\t' };
|
const whitespace = &[_]u32{ 0, ' ', '\t' };
|
||||||
const y_max = self.rowsWritten() - 1;
|
const y_max = self.rowsWritten() - 1;
|
||||||
|
Reference in New Issue
Block a user