Fix double-width characters in URLs only highlighting halfway
This commit is contained in:
parent
dbd8538762
commit
b321406908
|
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Double-width characters in URLs only being highlit on the left half
|
||||||
- PTY size not getting updated when message bar is shown
|
- PTY size not getting updated when message bar is shown
|
||||||
- Text Cursor disappearing
|
- Text Cursor disappearing
|
||||||
- Incorrect positioning of zero-width characters over double-width characters
|
- Incorrect positioning of zero-width characters over double-width characters
|
||||||
|
|
|
@ -418,18 +418,15 @@ impl<'a> Iterator for RenderableCellsIter<'a> {
|
||||||
let selected =
|
let selected =
|
||||||
self.selection.as_ref().map(|range| range.contains_(index)).unwrap_or(false);
|
self.selection.as_ref().map(|range| range.contains_(index)).unwrap_or(false);
|
||||||
|
|
||||||
// Skip empty cells
|
|
||||||
if cell.is_empty() && !selected {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Underline URL highlights
|
// Underline URL highlights
|
||||||
if self.url_highlight.as_ref().map(|range| range.contains_(index)).unwrap_or(false)
|
if self.url_highlight.as_ref().map(|range| range.contains_(index)).unwrap_or(false)
|
||||||
{
|
{
|
||||||
cell.inner.flags.insert(Flags::UNDERLINE);
|
cell.inner.flags.insert(Flags::UNDERLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Some(RenderableCell::new(self.config, self.colors, cell, selected));
|
if !cell.is_empty() || selected {
|
||||||
|
return Some(RenderableCell::new(self.config, self.colors, cell, selected));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue