aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input.rs b/src/input.rs
index f3efdf14..de8bca45 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -224,7 +224,7 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> {
let prev_line = mem::replace(&mut self.ctx.mouse_mut().line, point.line);
let prev_col = mem::replace(&mut self.ctx.mouse_mut().column, point.col);
- let cell_x = x as usize % size_info.cell_width as usize;
+ let cell_x = (x as usize - size_info.padding_x as usize) % size_info.cell_width as usize;
let half_cell_width = (size_info.cell_width / 2.0) as usize;
let cell_side = if cell_x > half_cell_width {