diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-25 06:39:02 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-25 07:23:23 +0800 |
commit | c8fe8c5ea4b57b4fb0aaf022b94aa7377c5b7a60 (patch) | |
tree | 4cd2faff4f84ec421bce5c31622cb4afeee01690 | |
parent | 2caf5bbbc58fcc9830cd3f8a6110b66040c6e660 (diff) | |
download | rneovim-c8fe8c5ea4b57b4fb0aaf022b94aa7377c5b7a60.tar.gz rneovim-c8fe8c5ea4b57b4fb0aaf022b94aa7377c5b7a60.tar.bz2 rneovim-c8fe8c5ea4b57b4fb0aaf022b94aa7377c5b7a60.zip |
vim-patch:8.2.4806: a mapping using <LeftDrag> does not start Select mode
Problem: A mapping using <LeftDrag> does not start Select mode.
Solution: When checking for starting select mode with the mouse also do this
when there is typeahead. (closes vim/vim#10249)
https://github.com/vim/vim/commit/53ef5731480d8b5aa74137a09b3b164b436ed76b
-rw-r--r-- | src/nvim/normal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index d0926e6b9e..ed5f13d00a 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -5740,10 +5740,10 @@ void start_selection(void) } /// Start Select mode, if "c" is in 'selectmode' and not in a mapping or menu. +/// When "c" is 'o' (checking for "mouse") then also when mapped. void may_start_select(int c) { - VIsual_select = (stuff_empty() && typebuf_typed() - && (vim_strchr(p_slm, c) != NULL)); + VIsual_select = (c == 'o' || (stuff_empty() && typebuf_typed())) && vim_strchr(p_slm, c) != NULL; } /// Start Visual mode "c". |