summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-16 15:52:35 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-16 15:52:35 +0000
commitdc98776f89689846466462767be75c6b63b6630f (patch)
tree7405917a98d8abe6164c4ebe9c8da35346bd1cd0 /src
parentd9b74a2a41e43ca17a9885ec0a58404adff4273f (diff)
patch 8.2.4113: typo on DOCMD_RANGEOK results in not recognizing commandv8.2.4113
Problem: Typo on DOCMD_RANGEOK results in not recognizing command. Solution: Correct the typo. (closes #9539)
Diffstat (limited to 'src')
-rw-r--r--src/testdir/test_mapping.vim16
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h2
3 files changed, 19 insertions, 1 deletions
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index 2d878d27b9..b170b580dc 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -1411,6 +1411,22 @@ func Test_map_script_cmd_restore()
unlet g:result
endfunc
+func Test_map_script_cmd_finds_func()
+ let lines =<< trim END
+ vim9script
+ onoremap <F3> <ScriptCmd>Func()<CR>
+ def Func()
+ g:func_called = 'yes'
+ enddef
+ END
+ call CheckScriptSuccess(lines)
+ call feedkeys("y\<F3>\<Esc>", 'xtc')
+ call assert_equal('yes', g:func_called)
+
+ ounmap <F3>
+ unlet g:func_called
+endfunc
+
" Test for using <script> with a map to remap characters in rhs
func Test_script_local_remap()
new
diff --git a/src/version.c b/src/version.c
index 44691def89..8862674286 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4113,
+/**/
4112,
/**/
4111,
diff --git a/src/vim.h b/src/vim.h
index 5d8f32e499..05bafdc2c4 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1074,7 +1074,7 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
#define DOCMD_KEYTYPED 0x08 // don't reset KeyTyped
#define DOCMD_EXCRESET 0x10 // reset exception environment (for debugging)
#define DOCMD_KEEPLINE 0x20 // keep typed line for repeating with "."
-#define DOCMD_RANGEOK 0240 // can use a range without ":" in Vim9 script
+#define DOCMD_RANGEOK 0x40 // can use a range without ":" in Vim9 script
// flags for beginline()
#define BL_WHITE 1 // cursor on first non-white in the line