diff options
author | Tuomas Siipola <siiptuo@kapsi.fi> | 2017-06-06 17:10:43 +0300 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-06-06 08:26:36 -0700 |
commit | 1e064fb3e772ad6249d132c7d63a17d233029621 (patch) | |
tree | 8abda686eff3593276752006f172a84f47bc350b | |
parent | 84fc7c0bf94eb0659c47e3bd1714a5f6b20313f7 (diff) | |
download | alacritty-1e064fb3e772ad6249d132c7d63a17d233029621.tar.gz alacritty-1e064fb3e772ad6249d132c7d63a17d233029621.zip |
Fix selection when padding is present
-rw-r--r-- | src/input.rs | 2 |
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 { |