Mercurial > vim
comparison src/term.c @ 13573:23e5f12f43d7 v8.0.1659
patch 8.0.1659: scroll events not recognized for some xterm emulators
commit https://github.com/vim/vim/commit/1f8495cf48888ff3a8ab3d0eb22db92389191a60
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 4 21:53:11 2018 +0200
patch 8.0.1659: scroll events not recognized for some xterm emulators
Problem: Scroll events not recognized for some xterm emulators.
Solution: Recognize mouse codes 0x40 and 0x41 as scroll events.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 04 Apr 2018 22:00:06 +0200 |
parents | 24e8f9044bed |
children | 9de2b25932eb |
comparison
equal
deleted
inserted
replaced
13572:9a854ee46751 | 13573:23e5f12f43d7 |
---|---|
5193 # ifdef FEAT_MOUSE_XTERM | 5193 # ifdef FEAT_MOUSE_XTERM |
5194 else if (held_button == MOUSE_RELEASE | 5194 else if (held_button == MOUSE_RELEASE |
5195 # ifdef FEAT_GUI | 5195 # ifdef FEAT_GUI |
5196 && !gui.in_use | 5196 && !gui.in_use |
5197 # endif | 5197 # endif |
5198 && (mouse_code == 0x23 || mouse_code == 0x24)) | 5198 && (mouse_code == 0x23 || mouse_code == 0x24 |
5199 || mouse_code == 0x40 || mouse_code == 0x41)) | |
5199 { | 5200 { |
5200 /* Apparently used by rxvt scroll wheel. */ | 5201 /* Apparently 0x23 and 0x24 are used by rxvt scroll wheel. |
5201 wheel_code = mouse_code - 0x23 + MOUSEWHEEL_LOW; | 5202 * And 0x40 and 0x41 are used by some xterm emulator. */ |
5203 wheel_code = mouse_code - (mouse_code >= 0x40 ? 0x40 : 0x23) | |
5204 + MOUSEWHEEL_LOW; | |
5202 } | 5205 } |
5203 # endif | 5206 # endif |
5204 | 5207 |
5205 # if defined(UNIX) && defined(FEAT_MOUSE_TTY) | 5208 # if defined(UNIX) && defined(FEAT_MOUSE_TTY) |
5206 else if (use_xterm_mouse() > 1) | 5209 else if (use_xterm_mouse() > 1) |