1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00

Fix inverted condition for cell's extra clearing

Fixes #6215.
This commit is contained in:
Kirill Chibisov 2022-07-24 13:05:46 +03:00 committed by GitHub
parent c3f3bd3666
commit 4fce2b16f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View file

@ -167,7 +167,7 @@ impl Cell {
&& self && self
.extra .extra
.as_ref() .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; self.extra = None;
} else { } else {
@ -186,7 +186,7 @@ impl Cell {
pub fn set_hyperlink(&mut self, hyperlink: Option<Hyperlink>) { pub fn set_hyperlink(&mut self, hyperlink: Option<Hyperlink>) {
let should_drop = hyperlink.is_none() let should_drop = hyperlink.is_none()
&& self.extra.as_ref().map_or(true, |extra| { && 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 { if should_drop {

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"screen_lines":38,"columns":140} {"columns":157,"screen_lines":40}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"columns":140,"screen_lines":38} {"columns":157,"screen_lines":40}