mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
terminal: full reset clears OSC8 state
This commit is contained in:
@ -2541,6 +2541,7 @@ pub fn fullReset(self: *Terminal) void {
|
|||||||
log.warn("restore cursor on primary screen failed err={}", .{err});
|
log.warn("restore cursor on primary screen failed err={}", .{err});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.screen.endHyperlink();
|
||||||
self.screen.charset = .{};
|
self.screen.charset = .{};
|
||||||
self.modes = .{};
|
self.modes = .{};
|
||||||
self.flags = .{};
|
self.flags = .{};
|
||||||
@ -9959,6 +9960,15 @@ test "Terminal: fullReset with a non-empty pen" {
|
|||||||
try testing.expectEqual(@as(style.Id, 0), t.screen.cursor.style_id);
|
try testing.expectEqual(@as(style.Id, 0), t.screen.cursor.style_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "Terminal: fullReset hyperlink" {
|
||||||
|
var t = try init(testing.allocator, .{ .cols = 80, .rows = 80 });
|
||||||
|
defer t.deinit(testing.allocator);
|
||||||
|
|
||||||
|
try t.screen.startHyperlink("http://example.com", null);
|
||||||
|
t.fullReset();
|
||||||
|
try testing.expectEqual(0, t.screen.cursor.hyperlink_id);
|
||||||
|
}
|
||||||
|
|
||||||
test "Terminal: fullReset with a non-empty saved cursor" {
|
test "Terminal: fullReset with a non-empty saved cursor" {
|
||||||
var t = try init(testing.allocator, .{ .cols = 80, .rows = 80 });
|
var t = try init(testing.allocator, .{ .cols = 80, .rows = 80 });
|
||||||
defer t.deinit(testing.allocator);
|
defer t.deinit(testing.allocator);
|
||||||
|
Reference in New Issue
Block a user