mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
reflow: respect wraparound mode when reflowing text
When calling resize, Ghostty should be respecting the wraparound state. This behavior matches xterm. Note that this same bug was also found in kitty. Fixes: #1343
This commit is contained in:
@ -330,11 +330,19 @@ pub fn resize(self: *Terminal, alloc: Allocator, cols: usize, rows: usize) !void
|
|||||||
// If we're making the screen smaller, dealloc the unused items.
|
// If we're making the screen smaller, dealloc the unused items.
|
||||||
if (self.active_screen == .primary) {
|
if (self.active_screen == .primary) {
|
||||||
self.clearPromptForResize();
|
self.clearPromptForResize();
|
||||||
try self.screen.resize(rows, cols);
|
if (self.modes.get(.wraparound)) {
|
||||||
|
try self.screen.resize(rows, cols);
|
||||||
|
} else {
|
||||||
|
try self.screen.resizeWithoutReflow(rows, cols);
|
||||||
|
}
|
||||||
try self.secondary_screen.resizeWithoutReflow(rows, cols);
|
try self.secondary_screen.resizeWithoutReflow(rows, cols);
|
||||||
} else {
|
} else {
|
||||||
try self.screen.resizeWithoutReflow(rows, cols);
|
try self.screen.resizeWithoutReflow(rows, cols);
|
||||||
try self.secondary_screen.resize(rows, cols);
|
if (self.modes.get(.wraparound)) {
|
||||||
|
try self.secondary_screen.resize(rows, cols);
|
||||||
|
} else {
|
||||||
|
try self.secondary_screen.resizeWithoutReflow(rows, cols);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set our size
|
// Set our size
|
||||||
|
Reference in New Issue
Block a user