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 #10249)
diff --git a/src/normal.c b/src/normal.c
index 5634925..e44b513 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5527,12 +5527,13 @@
/*
* 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;
}
/*