diff --git a/src/display.rs b/src/display.rs index 0d6be1e5..862be468 100644 --- a/src/display.rs +++ b/src/display.rs @@ -139,7 +139,7 @@ impl Display { // Create the window where Alacritty will be displayed let mut window = Window::new(&options.title)?; - // get window properties for initializing the other subsytems + // get window properties for initializing the other subsystems let mut viewport_size = window.inner_size_pixels() .expect("glutin returns window size"); let dpr = window.hidpi_factor(); @@ -155,17 +155,17 @@ impl Display { let dimensions = options.dimensions() .unwrap_or_else(|| config.dimensions()); - + // Resize window to specified dimensions unless one or both dimensions are 0 if dimensions.columns_u32() > 0 && dimensions.lines_u32() > 0 { let width = cell_width as u32 * dimensions.columns_u32(); let height = cell_height as u32 * dimensions.lines_u32(); - + let new_viewport_size = Size { width: Pixels(width + 2 * config.padding().x as u32), height: Pixels(height + 2 * config.padding().y as u32), }; - + window.set_inner_size(&new_viewport_size); renderer.resize(new_viewport_size.width.0 as _, new_viewport_size.height.0 as _); viewport_size = new_viewport_size