aboutsummaryrefslogtreecommitdiff
path: root/src/renderer/rects.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-19 18:00:24 +0000
committerGitHub <noreply@github.com>2019-04-19 18:00:24 +0000
commitcfc20d4f34dca535654cc32df18e785296af4cc5 (patch)
treeb9697a365d1ec4b3161fd67937497e90a63f5c0d /src/renderer/rects.rs
parenta47d716daace7c197392854754406a06454ec380 (diff)
downloadalacritty-cfc20d4f34dca535654cc32df18e785296af4cc5.tar.gz
alacritty-cfc20d4f34dca535654cc32df18e785296af4cc5.zip
Fix cursor dimensions with font offset
Previously cursor dimensions were not calculated correctly when a font offset was specified, since the font offset was completely ignored. This has been fixed by moving all the cursor logic from the font into the Alacritty crate, applying the config's offsets before rasterizing the cursors. This has also fixed an issue with some cursors not being rendered as double-width correctly when over double-width glyphs. This fixes #2209.
Diffstat (limited to 'src/renderer/rects.rs')
-rw-r--r--src/renderer/rects.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderer/rects.rs b/src/renderer/rects.rs
index 2e5cd85b..b4f8a012 100644
--- a/src/renderer/rects.rs
+++ b/src/renderer/rects.rs
@@ -96,7 +96,7 @@ impl<'a> Rects<'a> {
// Start a new line if the flag is present
if cell.flags.contains(line.flag) {
- *start = *cell;
+ *start = cell.clone();
*end = cell.into();
} else {
line.range = None;
@@ -105,7 +105,7 @@ impl<'a> Rects<'a> {
// Check for new start of line
None => {
if cell.flags.contains(line.flag) {
- line.range = Some((*cell, cell.into()));
+ line.range = Some((cell.clone(), cell.into()));
}
},
};