aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-11-17 17:49:05 +0300
committerGitHub <noreply@github.com>2020-11-17 17:49:05 +0300
commit9724418d350df881afe8453bde6eb88643e7211e (patch)
treee3f2cac36404430df1f5093226dcc9f944f66cc0 /alacritty_terminal
parent8b10e5e77840c0477a4b1575f91a4549d010af04 (diff)
downloadalacritty-9724418d350df881afe8453bde6eb88643e7211e.tar.gz
alacritty-9724418d350df881afe8453bde6eb88643e7211e.zip
Fix wide characters being cut off
Fixes #791.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/term/mod.rs16
1 files changed, 2 insertions, 14 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index cdcfad9d..fa2c5513 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -165,8 +165,8 @@ impl<'a, C> Iterator for RenderableCellsIter<'a, C> {
let cell = self.inner.next()?;
let cell = RenderableCell::new(self, cell);
- // Skip empty cells.
- if !cell.is_empty() {
+ // Skip empty cells and wide char spacers.
+ if !cell.is_empty() && !cell.flags.contains(Flags::WIDE_CHAR_SPACER) {
return Some(cell);
}
}
@@ -282,18 +282,6 @@ impl<'a, C> RenderableCellsIter<'a, C> {
// Check line-wrapping, leading spacer.
|| (self.grid[buffer_prev].flags.contains(Flags::LEADING_WIDE_CHAR_SPACER)
&& selection.contains(prev.col, prev.line))
- } else if cell.flags.contains(Flags::WIDE_CHAR_SPACER) {
- // Check if spacer's wide char is selected.
- let prev = point.sub(num_cols, 1);
- let buffer_prev = self.grid.visible_to_buffer(prev);
-
- if self.grid[buffer_prev].flags.contains(Flags::WIDE_CHAR) {
- // Check previous cell for trailing spacer.
- self.is_selected(prev)
- } else {
- // Check next cell for line-wrapping, leading spacer.
- self.is_selected(point.add(num_cols, 1))
- }
} else {
false
}