aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyose <ayosec@gmail.com>2021-05-31 20:46:49 +0100
committerAyose <ayosec@gmail.com>2021-05-31 20:46:49 +0100
commit89a9fc6d7ae15877f40fc3f1941e47eccf57713f (patch)
treefe228e90dbab41856f71f6655eb8d3edc34a8dc6
parentb6b7840cc760a58918c2f5d3b0d11c7f419a9244 (diff)
parent5972714b642efb3f257b77fdf526ebe8492cafd8 (diff)
downloadr-alacritty-89a9fc6d7ae15877f40fc3f1941e47eccf57713f.tar.gz
r-alacritty-89a9fc6d7ae15877f40fc3f1941e47eccf57713f.tar.bz2
r-alacritty-89a9fc6d7ae15877f40fc3f1941e47eccf57713f.zip
Merge commit '5972714b642efb3f257b77fdf526ebe8492cafd8' into graphics
-rw-r--r--alacritty_terminal/src/term/mod.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index 24fa7cf5..5b8a225a 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -1827,14 +1827,13 @@ impl<T: EventListener> Handler for Term<T> {
// Fill the cells under the graphic.
//
- // The cell in the first column contains a reference to the graphic,
- // with the offset from the start. Rest of the cells are empty.
+ // The cell in the first column contains a reference to the
+ // graphic, with the offset from the start. The rest of the
+ // cells are not overwritten, allowing any text behind
+ // transparent portions of the image to be visible.
let left = if scrolling { self.grid.cursor.point.column.0 } else { 0 };
- let graphic_columns = (graphic.width + self.cell_width - 1) / self.cell_width;
- let right = min(self.columns(), left + graphic_columns);
-
let texture = Arc::new(TextureRef {
id: graphic_id,
remove_queue: Arc::downgrade(&self.graphics.remove_queue),
@@ -1854,14 +1853,10 @@ impl<T: EventListener> Handler for Term<T> {
// Store a reference to the graphic in the first column.
let graphic_cell = GraphicCell { texture: texture.clone(), offset_x: 0, offset_y };
- let mut cell = Cell::default();
+ let mut cell = self.grid[line][Column(left)].clone();
cell.set_graphic(graphic_cell);
self.grid[line][Column(left)] = cell;
- for col in left + 1..right {
- self.grid[line][Column(col)] = Cell::default();
- }
-
if scrolling {
self.linefeed();
}