Patch 8.1.2321
Problem: Cannot select all text with the mouse. (John Marriott)
Solution: Move limiting the mouse column to f_getmousepos(). (closes #5242)
Files: src/mouse.c
*** ../vim-8.1.2320/src/mouse.c 2019-11-18 21:38:33.747362315 +0100
--- src/mouse.c 2019-11-18 23:22:01.873922447 +0100
***************
*** 2822,2828 ****
int retval = FALSE;
int off;
int count;
- char_u *p;
#ifdef FEAT_RIGHTLEFT
if (win->w_p_rl)
--- 2822,2827 ----
***************
*** 2882,2892 ****
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)
--- 2881,2886 ----
***************
*** 3053,3059 ****
--- 3047,3063 ----
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;
}
}
*** ../vim-8.1.2320/src/version.c 2019-11-18 22:02:12.812154964 +0100
--- src/version.c 2019-11-18 23:17:11.534492205 +0100
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 2321,
/**/
--
I AM THANKFUL...
...for the mess to clean after a party because it means I have
been surrounded by friends.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201911182232.xAIMWM86007160%40masaka.moolenaar.net.