mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Prevent terminal being a single column wide (#7471)
Fixes: #2750 Fixes: #7457 Release Notes: - Fixed a hang/panic that could happen rendering a double-width character in a single-width terminal ([#2750](https://github.com/zed-industries/zed/issues/2750), [#7457](https://github.com/zed-industries/zed/issues/7457)).
This commit is contained in:
parent
1264e36429
commit
90cd3b5e87
@ -450,6 +450,13 @@ impl TerminalElement {
|
||||
let mut size = bounds.size.clone();
|
||||
size.width -= gutter;
|
||||
|
||||
// https://github.com/zed-industries/zed/issues/2750
|
||||
// if the terminal is one column wide, rendering 🦀
|
||||
// causes alacritty to misbehave.
|
||||
if size.width < cell_width * 2.0 {
|
||||
size.width = cell_width * 2.0;
|
||||
}
|
||||
|
||||
TerminalSize::new(line_height, cell_width, size)
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user