Mercurial > vim
changeset 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 | baa9bbdc4364 |
children | da39caa6fc93 |
files | src/libvterm/src/mouse.c src/terminal.c src/version.c |
diffstat | 3 files changed, 4 insertions(+), 1 deletions(-) [+] |
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);
--- 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