Patch 8.0.1323
Problem: Mouse events in a terminal window may cause endless loop.
Solution: Adjust position computation. Don't stuff a mouse event when
coming from normal_cmd().
Files: src/normal.c, src/terminal.c
*** ../vim-8.0.1322/src/normal.c 2017-11-18 22:13:04.753908641 +0100
--- src/normal.c 2017-11-20 12:41:37.155773876 +0100
***************
*** 4633,4639 ****
{
# ifdef FEAT_TERMINAL
if (term_use_loop())
! send_keys_to_term(curbuf->b_term, cap->cmdchar, TRUE);
else
# endif
if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
--- 4633,4641 ----
{
# ifdef FEAT_TERMINAL
if (term_use_loop())
! /* This window is a terminal window, send the mouse event there.
! * Set "typed" to FALSE to avoid an endless loop. */
! send_keys_to_term(curbuf->b_term, cap->cmdchar, FALSE);
else
# endif
if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
*** ../vim-8.0.1322/src/terminal.c 2017-11-19 15:05:40.142159632 +0100
--- src/terminal.c 2017-11-20 12:39:59.497228149 +0100
***************
*** 1302,1310 ****
case K_MOUSELEFT:
case K_MOUSERIGHT:
if (mouse_row < W_WINROW(curwin)
! || mouse_row >= (W_WINROW(curwin) + curwin->w_height)
|| mouse_col < curwin->w_wincol
! || mouse_col >= W_ENDCOL(curwin)
|| dragging_outside)
{
/* click or scroll outside the current window */
--- 1302,1310 ----
case K_MOUSELEFT:
case K_MOUSERIGHT:
if (mouse_row < W_WINROW(curwin)
! || mouse_row > (W_WINROW(curwin) + curwin->w_height)
|| mouse_col < curwin->w_wincol
! || mouse_col > W_ENDCOL(curwin)
|| dragging_outside)
{
/* click or scroll outside the current window */
*** ../vim-8.0.1322/src/version.c 2017-11-19 20:38:01.679936742 +0100
--- src/version.c 2017-11-20 21:48:03.556159011 +0100
***************
*** 773,774 ****
--- 773,776 ----
{ /* Add new patch number below this line */
+ /**/
+ 1323,
/**/
--
hundred-and-one symptoms of being an internet addict:
17. You turn on your intercom when leaving the room so you can hear if new
e-mail arrives.
/// 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].
For more options, visit https://groups.google.com/d/optout.