diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-01-01 20:04:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-01 20:04:09 +0100 |
commit | 90f619f140f0736f67fef796d58203fe261c43af (patch) | |
tree | b6ee6639b7ac844a6aa18104591902cf416908ab /src/nvim/normal.c | |
parent | f3a8c930a4b901c5313701849e7010f098bf22e6 (diff) | |
parent | 6db86cb2d3d4ca152f156dc07362f8796150fae0 (diff) | |
download | rneovim-90f619f140f0736f67fef796d58203fe261c43af.tar.gz rneovim-90f619f140f0736f67fef796d58203fe261c43af.tar.bz2 rneovim-90f619f140f0736f67fef796d58203fe261c43af.zip |
Merge pull request #13592 from bfredl/setmouse
ui: make 'mouse' handling in external UI more consistent
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index f93d772068..4e955667dc 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -2375,10 +2375,10 @@ do_mouse ( * Also paste at the cursor if the current mode isn't in 'mouse' (only * happens for the GUI). */ - if ((State & INSERT) || !mouse_has(MOUSE_NORMAL)) { - if (regname == '.') + if ((State & INSERT)) { + if (regname == '.') { insert_reg(regname, true); - else { + } else { if (regname == 0 && eval_has_provider("clipboard")) { regname = '*'; } @@ -2558,8 +2558,9 @@ do_mouse ( * on a status line */ if (VIsual_active) jump_flags |= MOUSE_MAY_STOP_VIS; - } else if (mouse_has(MOUSE_VISUAL)) + } else { jump_flags |= MOUSE_MAY_VIS; + } } else if (which_button == MOUSE_RIGHT) { if (is_click && VIsual_active) { /* @@ -2575,8 +2576,7 @@ do_mouse ( } } jump_flags |= MOUSE_FOCUS; - if (mouse_has(MOUSE_VISUAL)) - jump_flags |= MOUSE_MAY_VIS; + jump_flags |= MOUSE_MAY_VIS; } } @@ -2790,8 +2790,7 @@ do_mouse ( /* Handle double clicks, unless on status line */ else if (in_status_line) { } else if (in_sep_line) { - } else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT)) - && mouse_has(MOUSE_VISUAL)) { + } else if ((mod_mask & MOD_MASK_MULTI_CLICK) && (State & (NORMAL | INSERT))) { if (is_click || !VIsual_active) { if (VIsual_active) { orig_cursor = VIsual; |