From 37c8b48015f698addbbc3ede540a4cabb4cc8631 Mon Sep 17 00:00:00 2001 From: daa Date: Sun, 23 Apr 2017 12:54:46 +0300 Subject: [PATCH] Fix italic repaint problem --- src/shell.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shell.rs b/src/shell.rs index cee3090..8553731 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -137,7 +137,7 @@ impl State { let mut rect = rect.as_ref().clone(); // this need to repain also line under curren line // in case underscore or 'g' symbol is go here - rect.extend(0, 1, 0, 0); + rect.extend(0, 1, 0, 1); let (x, y, width, height) = rect.to_area(line_height, char_width); self.drawing_area.queue_draw_area(x, y, width, height); } @@ -446,8 +446,9 @@ fn get_model_clip(state: &State, ModelRect::from_area(line_height, char_width, clip.0, clip.1, clip.2, clip.3); // in some cases symbols from previous row affect next row // for example underscore symbol or 'g' + // also for italic text it is possible that symbol can affect next one // see deference between logical rect and ink rect - model_clip.extend(1, 0, 0, 0); + model_clip.extend(1, 0, 1, 0); state.model.limit_to_model(&mut model_clip); model_clip