summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-22 21:20:26 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-22 21:20:26 +0100
commit53ef5731480d8b5aa74137a09b3b164b436ed76b (patch)
treed5db116b38b1308858a40b98a4b5d46d6c439b6c
parent9b36750640e8e89f18afa1446ed80fdbdf0fcac0 (diff)
downloadvim-git-53ef5731480d8b5aa74137a09b3b164b436ed76b.tar.gz
patch 8.2.4806: a mapping using <LeftDrag> does not start Select modev8.2.4806
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)
-rw-r--r--src/normal.c5
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c
index 563492551..e44b51320 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5527,12 +5527,13 @@ 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;
}
/*
diff --git a/src/version.c b/src/version.c
index 28ac75e98..6df25dae0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4806,
+/**/
4805,
/**/
4804,