alternate screen buffer (mode 1049) now supported

This commit is contained in:
Mitchell Hashimoto
2022-07-22 13:35:11 -07:00
parent 5564bd7213
commit d672bedec7
4 changed files with 90 additions and 6 deletions

View File

@@ -775,6 +775,21 @@ pub fn setMode(self: *Window, mode: terminal.Mode, enabled: bool) !void {
self.terminal.modes.autowrap = @boolToInt(enabled);
},
.alt_screen_save_cursor_clear_enter => {
const opts: terminal.Terminal.AlternateScreenOptions = .{
.cursor_save = true,
.clear_on_enter = true,
};
if (enabled)
self.terminal.alternateScreen(opts)
else
self.terminal.primaryScreen(opts);
// Schedule a render since we changed screens
try self.render_timer.schedule();
},
.bracketed_paste => self.bracketed_paste = true,
.enable_mode_3 => self.terminal.modes.enable_mode_3 = @boolToInt(enabled),