diff src/libvterm/src/mouse.c @ 11979:4d4ee9c5803c v8.0.0870

patch 8.0.0870: mouse escape codes sent to terminal unintentionally commit https://github.com/vim/vim/commit/b9279e73aee44a266c241619db65c645f7db72ee Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 5 18:02:21 2017 +0200 patch 8.0.0870: mouse escape codes sent to terminal unintentionally Problem: Mouse escape codes sent to terminal unintentionally. Solution: Fix libvterm to send mouse codes only when enabled.
author Christian Brabandt <cb@256bit.org>
date Sat, 05 Aug 2017 18:15:03 +0200
parents c76b672df584
children 9f857e6310b6
line wrap: on
line diff
--- a/src/libvterm/src/mouse.c
+++ b/src/libvterm/src/mouse.c
@@ -86,6 +86,8 @@ void vterm_mouse_button(VTerm *vt, int b
   /* 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);