summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-05 19:34:47 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-05 19:34:47 +0200
commit98fd66d311a62133c835307dc7692763dfa32c69 (patch)
tree478b884a33d599ca23ff69f50bdb4a5afe4144f4 /src/normal.c
parent086d535f775da1abc557f5f28d101ff3308dc18f (diff)
downloadvim-git-98fd66d311a62133c835307dc7692763dfa32c69.tar.gz
patch 8.0.0872: no mouse scroll with a terminal windowv8.0.0872
Problem: Using mouse scroll while a terminal window has focus and the mouse pointer is on another window does not work. Same for focus in a non-terminal window ahd the mouse pointer is over a terminal window. Solution: Send the scroll action to the right window.
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/normal.c b/src/normal.c
index 16f9f0ea5..25ab2d345 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4638,6 +4638,11 @@ nv_mousescroll(cmdarg_T *cap)
if (cap->arg == MSCR_UP || cap->arg == MSCR_DOWN)
{
+# ifdef FEAT_TERMINAL
+ if (term_use_loop())
+ send_keys_to_term(curbuf->b_term, cap->cmdchar, TRUE);
+ else
+# endif
if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL))
{
(void)onepage(cap->arg ? FORWARD : BACKWARD, 1L);