comparison src/move.c @ 33575:8fc442c731ca v9.0.2032

patch 9.0.2032: cannot get mouse click pos for tab or virt text Commit: https://github.com/vim/vim/commit/f5a94d5165bb9e390797da50a1fa7a87df3fbee4 Author: zeertzjq <zeertzjq@outlook.com> Date: Sun Oct 15 10:03:30 2023 +0200 patch 9.0.2032: cannot get mouse click pos for tab or virt text Problem: Cannot accurately get mouse clicking position when clicking on a TAB or with virtual text. Solution: Add a "coladd" field to getmousepos() result. closes: #13335 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Oct 2023 10:15:05 +0200
parents bfe07ef45143
children 6e4bf51ec635
comparison
equal deleted inserted replaced
33574:a559d0a21b25 33575:8fc442c731ca
1545 * returned. 1545 * returned.
1546 */ 1546 */
1547 static int 1547 static int
1548 virtcol2col(win_T *wp, linenr_T lnum, int vcol) 1548 virtcol2col(win_T *wp, linenr_T lnum, int vcol)
1549 { 1549 {
1550 int offset = vcol2col(wp, lnum, vcol - 1); 1550 int offset = vcol2col(wp, lnum, vcol - 1, NULL);
1551 char_u *line = ml_get_buf(wp->w_buffer, lnum, FALSE); 1551 char_u *line = ml_get_buf(wp->w_buffer, lnum, FALSE);
1552 char_u *p = line + offset; 1552 char_u *p = line + offset;
1553 1553
1554 if (*p == NUL) 1554 if (*p == NUL)
1555 { 1555 {