int retval = FALSE;
int off;
int count;
- char_u *p;
#ifdef FEAT_RIGHTLEFT
if (win->w_p_rl)
col += row * (win->w_width - off);
// add skip column (for long wrapping line)
col += win->w_skipcol;
- // limit to text length plus one
- p = ml_get_buf(win->w_buffer, lnum, FALSE);
- count = (int)STRLEN(p);
- if (col > count)
- col = count;
}
if (!win->w_p_wrap)
col -= left_off;
if (row >= 0 && row < wp->w_height && col >= 0 && col < wp->w_width)
{
+ char_u *p;
+ int count;
+
mouse_comp_pos(wp, &row, &col, &line, NULL);
+
+ // limit to text length plus one
+ p = ml_get_buf(wp->w_buffer, line, FALSE);
+ count = (int)STRLEN(p);
+ if (col > count)
+ col = count;
+
column = col + 1;
}
}