summaryrefslogtreecommitdiffstats
path: root/src/mouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mouse.c')
-rw-r--r--src/mouse.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/mouse.c b/src/mouse.c
index e5f06874f8..af14af0501 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -2098,35 +2098,7 @@ retnomove:
redraw_cmdline = TRUE; // show visual mode later
}
- if (col_from_screen == MAXCOL)
- {
- // When clicking after end of line, still need to set correct curswant
- int off_l = LineOffset[prev_row] + curwin->w_wincol;
- if (ScreenCols[off_l] < MAXCOL)
- {
- // Binary search to find last char in line
- int off_r = LineOffset[prev_row] + prev_col;
- int off_click = off_r;
- while (off_l < off_r)
- {
- int off_m = (off_l + off_r + 1) / 2;
- if (ScreenCols[off_m] < MAXCOL)
- off_l = off_m;
- else
- off_r = off_m - 1;
- }
- colnr_T eol_vcol = ScreenCols[off_r];
- if (eol_vcol < 0)
- // Empty line or whole line before w_leftcol,
- // with columns before buffer text
- eol_vcol = curwin->w_leftcol - 1;
- col = eol_vcol + (off_click - off_r);
- }
- else
- // Empty line or whole line before w_leftcol
- col = prev_col - curwin->w_wincol + curwin->w_leftcol;
- }
- else if (col_from_screen >= 0)
+ if (col_from_screen >= 0)
{
// Use the virtual column from ScreenCols[], it is accurate also after
// concealed characters.