aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/mouse.c')
-rw-r--r--src/nvim/mouse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c
index 7b267d6ce4..734ece73b4 100644
--- a/src/nvim/mouse.c
+++ b/src/nvim/mouse.c
@@ -31,7 +31,9 @@
static linenr_T orig_topline = 0;
static int orig_topfill = 0;
-/// Translate window coordinates to buffer position without any side effects
+/// Translate window coordinates to buffer position without any side effects.
+/// Returns IN_BUFFER and sets "mpos->col" to the column when in buffer text.
+/// The column is one for the first column.
int get_fpos_of_mouse(pos_T *mpos)
{
int grid = mouse_grid;
@@ -67,9 +69,6 @@ int get_fpos_of_mouse(pos_T *mpos)
mpos->col = vcol2col(wp, mpos->lnum, col);
- if (mpos->col > 0) {
- mpos->col--;
- }
mpos->coladd = 0;
return IN_BUFFER;
}