From 593d7718d0d3e1e2071021d34178856079ac8bf7 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 26 Sep 2018 18:42:41 +0000 Subject: Fix selection of empty lines When selecting multiple lines in Alacritty, there was an issue with empty lines not being copied. This behavior has been chanaged so empty lines should be correctly copied now. When copying content which ends with an empty line, Alacritty would copy an additional empty line. This has been resolved by only adding empty lines when the empty line was not in the last selected line. --- src/tty.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/tty.rs') diff --git a/src/tty.rs b/src/tty.rs index b9d00fa5..b4a8e316 100644 --- a/src/tty.rs +++ b/src/tty.rs @@ -216,10 +216,11 @@ pub fn new(config: &Config, options: &Options, size: &T, window_id // TERM; default to 'alacritty' if it is available, otherwise // default to 'xterm-256color'. May be overridden by user's config // below. - let mut term = "alacritty"; - if let Err(_) = Database::from_name("alacritty") { - term = "xterm-256color"; - } + let term = if Database::from_name("alacritty").is_ok() { + "alacritty" + } else { + "xterm-256color" + }; builder.env("TERM", term); builder.env("COLORTERM", "truecolor"); // advertise 24-bit support -- cgit