terminfo: add E3 for clear scrollback

`clear(1)` uses this to clear scrollback unless supressed with `-x`.
This commit is contained in:
Mitchell Hashimoto
2023-10-29 12:52:24 -07:00
parent 68275d6afa
commit 155cd099ba

View File

@ -147,6 +147,10 @@ pub const ghostty: Source = .{
.{ .name = "Clmg", .value = .{ .string = "\\E[s" } }, .{ .name = "Clmg", .value = .{ .string = "\\E[s" } },
.{ .name = "Cmg", .value = .{ .string = "\\E[%i%p1%d;%p2%ds" } }, .{ .name = "Cmg", .value = .{ .string = "\\E[%i%p1%d;%p2%ds" } },
// Clear screen. E3 is the extension to clear scrollback
.{ .name = "clear", .value = .{ .string = "\\E[H\\E[2J" } },
.{ .name = "E3", .value = .{ .string = "\\E[3J" } },
// These are all capabilities that should be pretty straightforward // These are all capabilities that should be pretty straightforward
// and map to input sequences. // and map to input sequences.
.{ .name = "bel", .value = .{ .string = "^G" } }, .{ .name = "bel", .value = .{ .string = "^G" } },
@ -154,7 +158,6 @@ pub const ghostty: Source = .{
.{ .name = "bold", .value = .{ .string = "\\E[1m" } }, .{ .name = "bold", .value = .{ .string = "\\E[1m" } },
.{ .name = "cbt", .value = .{ .string = "\\E[Z" } }, .{ .name = "cbt", .value = .{ .string = "\\E[Z" } },
.{ .name = "civis", .value = .{ .string = "\\E[?25l" } }, .{ .name = "civis", .value = .{ .string = "\\E[?25l" } },
.{ .name = "clear", .value = .{ .string = "\\E[H\\E[2J" } },
.{ .name = "cnorm", .value = .{ .string = "\\E[?12l\\E[?25h" } }, .{ .name = "cnorm", .value = .{ .string = "\\E[?12l\\E[?25h" } },
.{ .name = "cr", .value = .{ .string = "\\r" } }, .{ .name = "cr", .value = .{ .string = "\\r" } },
.{ .name = "csr", .value = .{ .string = "\\E[%i%p1%d;%p2%dr" } }, .{ .name = "csr", .value = .{ .string = "\\E[%i%p1%d;%p2%dr" } },