commit c8fe8c5ea4b57b4fb0aaf022b94aa7377c5b7a60
parent 2caf5bbbc58fcc9830cd3f8a6110b66040c6e660
Author: zeertzjq <zeertzjq@outlook.com>
Date: Mon, 25 Apr 2022 06:39:02 +0800
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
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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".