# HG changeset patch # User Christian Brabandt # Date 1501949703 -7200 # Node ID 4d4ee9c5803cef5b0bc95996f49dffa33acb40da # Parent baa9bbdc43645c03bdd258dcf9b95e5e811b8d12 patch 8.0.0870: mouse escape codes sent to terminal unintentionally commit https://github.com/vim/vim/commit/b9279e73aee44a266c241619db65c645f7db72ee Author: Bram Moolenaar 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. diff --git a/src/libvterm/src/mouse.c b/src/libvterm/src/mouse.c --- 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); diff --git a/src/terminal.c b/src/terminal.c --- a/src/terminal.c +++ b/src/terminal.c @@ -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 diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 870, +/**/ 869, /**/ 868,