diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/display/mod.rs | 21 |
2 files changed, 13 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ba393d7e..bb37f005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Crash with `OT-SVG` fonts on Linux/BSD - Crash during text compose on old GNOME under Wayland - Mouse cursor staying hidden after window regains focus on macOS Ventura +- Blurry fonts when changing padding size at runtime ## 0.11.0 diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs index ed1b1fc5..3e015874 100644 --- a/alacritty/src/display/mod.rs +++ b/alacritty/src/display/mod.rs @@ -620,14 +620,11 @@ impl Display { if let Some(dimensions) = pending_update.dimensions() { width = dimensions.width as f32; height = dimensions.height as f32; - - let renderer_update = self.pending_renderer_update.get_or_insert(Default::default()); - renderer_update.resize = true } let padding = config.window.padding(self.window.scale_factor as f32); - self.size_info = SizeInfo::new( + let mut new_size = SizeInfo::new( width, height, cell_width, @@ -638,16 +635,22 @@ impl Display { ); // Update number of column/lines in the viewport. - let message_bar_lines = - message_buffer.message().map_or(0, |m| m.text(&self.size_info).len()); + let message_bar_lines = message_buffer.message().map_or(0, |m| m.text(&new_size).len()); let search_lines = usize::from(search_active); - self.size_info.reserve_lines(message_bar_lines + search_lines); + new_size.reserve_lines(message_bar_lines + search_lines); // Resize PTY. - pty_resize_handle.on_resize(self.size_info.into()); + pty_resize_handle.on_resize(new_size.into()); // Resize terminal. - terminal.resize(self.size_info); + terminal.resize(new_size); + + // Queue renderer update if terminal dimensions/padding changed. + if new_size != self.size_info { + let renderer_update = self.pending_renderer_update.get_or_insert(Default::default()); + renderer_update.resize = true; + } + self.size_info = new_size; } /// Update the state of the renderer. |