diff options
Diffstat (limited to 'src/client/shell/composition.rs')
| -rw-r--r-- | src/client/shell/composition.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/shell/composition.rs b/src/client/shell/composition.rs index cee57d96..0a577295 100644 --- a/src/client/shell/composition.rs +++ b/src/client/shell/composition.rs @@ -394,12 +394,14 @@ impl ClientShellState { .saturating_sub(copy_mode.offset_from_bottom) .min(u32::MAX as usize) as u32; let viewport_row = copy_mode.cursor.row.saturating_sub(viewport_top); + let x = hit.inner_rect.x.saturating_add(copy_mode.cursor.col); + let y = hit.inner_rect.y.saturating_add(viewport_row as u16); if viewport_row < u32::from(hit.inner_rect.height) && copy_mode.cursor.col < hit.inner_rect.width + && x < frame.width + && y < frame.height { let mut composed = frame.to_ratatui_buffer()?; - let x = hit.inner_rect.x + copy_mode.cursor.col; - let y = hit.inner_rect.y + viewport_row as u16; occlusion.cover(Rect::new(x, y, 1, 1)); composed[(x, y)].set_style( Style::default() |
