diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-07-24 13:05:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 13:05:46 +0300 |
commit | 4fce2b16f572719bc8036eed0ad06ab41e52f95a (patch) | |
tree | ffdc51263fbf4b27dd8b07a6654b6ba2eefd404c /alacritty_terminal/src/term/cell.rs | |
parent | c3f3bd36669fc6cf6c5998bfe54cb90ae58dde8f (diff) | |
download | alacritty-4fce2b16f572719bc8036eed0ad06ab41e52f95a.tar.gz alacritty-4fce2b16f572719bc8036eed0ad06ab41e52f95a.zip |
Fix inverted condition for cell's extra clearing
Fixes #6215.
Diffstat (limited to 'alacritty_terminal/src/term/cell.rs')
-rw-r--r-- | alacritty_terminal/src/term/cell.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alacritty_terminal/src/term/cell.rs b/alacritty_terminal/src/term/cell.rs index d3f45e9a..bd331c68 100644 --- a/alacritty_terminal/src/term/cell.rs +++ b/alacritty_terminal/src/term/cell.rs @@ -167,7 +167,7 @@ impl Cell { && self .extra .as_ref() - .map_or(true, |extra| !extra.zerowidth.is_empty() || extra.hyperlink.is_some()) + .map_or(true, |extra| extra.zerowidth.is_empty() && extra.hyperlink.is_none()) { self.extra = None; } else { @@ -186,7 +186,7 @@ impl Cell { pub fn set_hyperlink(&mut self, hyperlink: Option<Hyperlink>) { let should_drop = hyperlink.is_none() && self.extra.as_ref().map_or(true, |extra| { - !extra.zerowidth.is_empty() || extra.underline_color.is_some() + extra.zerowidth.is_empty() && extra.underline_color.is_none() }); if should_drop { |