From b1032bcc6b79135f87f327548e43563da05657fb Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 13 Mar 2019 18:55:18 +0000 Subject: Add text reflow Alacritty will now automatically reflow lines and shrink them when they would usually exceed the new width of the terminal instead of truncation. If a line had to be truncated, it will also be reflown into the previous line after growing the terminal width. The reflow behavior when not at the bottom of the history is similar to that of VTE and aims to keep the viewport stationary whenever possible. Opposed to VTE, reflow will also be performed in the alternate screen buffer. There will be bugs when resizing the terminal emulator to a size smaller than the prompt, though these issues were present in all terminal emulators with reflow support. This fixes #591. --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 4f569cf5..d5142dbe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,7 @@ use std::os::unix::io::AsRawFd; #[cfg(target_os = "macos")] use alacritty::locale; use alacritty::{cli, event, die}; -use alacritty::config::{self, Config}; +use alacritty::config::{self, Config, Monitor}; use alacritty::display::Display; use alacritty::event_loop::{self, EventLoop, Msg}; use alacritty::logging; @@ -221,7 +221,7 @@ fn run( let mut terminal_lock = processor.process_events(&terminal, display.window()); // Handle config reloads - if let Some(ref path) = config_monitor.as_ref().and_then(|monitor| monitor.pending()) { + if let Some(ref path) = config_monitor.as_ref().and_then(Monitor::pending) { // Clear old config messages from bar terminal_lock.message_buffer_mut().remove_topic(config::SOURCE_FILE_PATH); -- cgit