aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-14 23:45:31 +0800
committerGitHub <noreply@github.com>2022-12-14 23:45:31 +0800
commit6631df9107ff0d778ca03731867c477c8591f1fc (patch)
tree0c4dfa4ec5ae2364b30570130d0ed9673df9e85c /src
parentd127c684faa9a112575798a81c87babb1c83a7ea (diff)
downloadrneovim-6631df9107ff0d778ca03731867c477c8591f1fc.tar.gz
rneovim-6631df9107ff0d778ca03731867c477c8591f1fc.tar.bz2
rneovim-6631df9107ff0d778ca03731867c477c8591f1fc.zip
fix(terminal): fix 'mousescroll' not respected in terminal mode (#21415)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/terminal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 10a0c9c18c..106e92d43c 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -1439,8 +1439,8 @@ static bool send_mouse_event(Terminal *term, int c)
int direction = c == K_MOUSEDOWN ? MSCR_DOWN : MSCR_UP;
if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) {
scroll_redraw(direction, curwin->w_botline - curwin->w_topline);
- } else {
- scroll_redraw(direction, 3L);
+ } else if (p_mousescroll_vert > 0) {
+ scroll_redraw(direction, p_mousescroll_vert);
}
curwin->w_redr_status = true;