]> granicus.if.org Git - vim/commitdiff
patch 8.0.0870: mouse escape codes sent to terminal unintentionally v8.0.0870
authorBram Moolenaar <Bram@vim.org>
Sat, 5 Aug 2017 16:02:21 +0000 (18:02 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 5 Aug 2017 16:02:21 +0000 (18:02 +0200)
Problem:    Mouse escape codes sent to terminal unintentionally.
Solution:   Fix libvterm to send mouse codes only when enabled.

src/libvterm/src/mouse.c
src/terminal.c
src/version.c

index ba17aa466fda01fc9c9350c531fb0792bf74e7c1..273bde98e327eaaf44673e3748061f58464acc58 100644 (file)
@@ -86,6 +86,8 @@ void vterm_mouse_button(VTerm *vt, int button, int pressed, VTermModifier mod)
   /* Most of the time we don't get button releases from 4/5 */
   if(state->mouse_buttons == old_buttons && button < 4)
     return;
+  if (!(state->mouse_flags & MOUSE_WANT_CLICK))
+    return;
 
   if(button < 4) {
     output_mouse(state, button-1, pressed, mod, state->mouse_col, state->mouse_row);
index b708f3e948a79bb3dc3e9e076bf9b47ecb5106cf..0f5382bacd2e892b131e47277475eaed0dc70564 100644 (file)
@@ -37,7 +37,6 @@
  *
  * TODO:
  * - MS-Windows: no redraw for 'updatetime'  #1915
- * - in bash mouse clicks are inserting characters.
  * - mouse scroll: when over other window, scroll that window.
  * - add argument to term_wait() for waiting time.
  * - For the scrollback buffer store lines in the buffer, only attributes in
index d1b20b1733de53c8a02059cebf66f23a6c9142f1..195be511ede08f893ce6ec56f560f920632f61bc 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    870,
 /**/
     869,
 /**/