Reset status display after a full reset

This commit is contained in:
Gregory Anders
2024-02-09 15:43:41 -06:00
parent 8eaf49bd68
commit 21412847c7

View File

@ -2186,6 +2186,7 @@ pub fn fullReset(self: *Terminal, alloc: Allocator) void {
self.eraseDisplay(alloc, .scrollback, false); self.eraseDisplay(alloc, .scrollback, false);
self.eraseDisplay(alloc, .complete, false); self.eraseDisplay(alloc, .complete, false);
self.pwd.clearRetainingCapacity(); self.pwd.clearRetainingCapacity();
self.status_display = .main;
} }
test "Terminal: fullReset with a non-empty pen" { test "Terminal: fullReset with a non-empty pen" {
@ -2215,6 +2216,15 @@ test "Terminal: fullReset origin mode" {
try testing.expect(!t.modes.get(.origin)); try testing.expect(!t.modes.get(.origin));
} }
test "Terminal: fullReset status display" {
var t = try init(testing.allocator, 10, 10);
defer t.deinit(testing.allocator);
t.status_display = .status_line;
t.fullReset(testing.allocator);
try testing.expect(t.status_display == .main);
}
test "Terminal: input with no control characters" { test "Terminal: input with no control characters" {
var t = try init(testing.allocator, 80, 80); var t = try init(testing.allocator, 80, 80);
defer t.deinit(testing.allocator); defer t.deinit(testing.allocator);