summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/testdir/test_vim9_disassemble.vim45
-rw-r--r--src/version.c2
-rw-r--r--src/vim9compile.c2
3 files changed, 34 insertions, 15 deletions
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index 5d9447d8c..3c7724df1 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -83,20 +83,37 @@ enddef
def Test_disassemble_exec_expr()
let res = execute('disass s:EditExpand')
- assert_match('<SNR>\d*_EditExpand.*' ..
- ' let filename = "file".*' ..
- '\d PUSHS "file".*' ..
- '\d STORE $0.*' ..
- ' let filenr = 123.*' ..
- '\d STORE 123 in $1.*' ..
- ' edit the`=filename``=filenr`.txt.*' ..
- '\d PUSHS "edit the".*' ..
- '\d LOAD $0.*' ..
- '\d LOAD $1.*' ..
- '\d 2STRING stack\[-1\].*' ..
- '\d PUSHS ".txt".*' ..
- '\d EXECCONCAT 4.*' ..
- '\d PUSHNR 0.*' ..
+ assert_match('<SNR>\d*_EditExpand\_s*' ..
+ ' let filename = "file"\_s*' ..
+ '\d PUSHS "file"\_s*' ..
+ '\d STORE $0\_s*' ..
+ ' let filenr = 123\_s*' ..
+ '\d STORE 123 in $1\_s*' ..
+ ' edit the`=filename``=filenr`.txt\_s*' ..
+ '\d PUSHS "edit the"\_s*' ..
+ '\d LOAD $0\_s*' ..
+ '\d LOAD $1\_s*' ..
+ '\d 2STRING stack\[-1\]\_s*' ..
+ '\d\+ PUSHS ".txt"\_s*' ..
+ '\d\+ EXECCONCAT 4\_s*' ..
+ '\d\+ PUSHNR 0\_s*' ..
+ '\d\+ RETURN',
+ res)
+enddef
+
+def s:YankRange()
+ norm! m[jjm]
+ :'[,']yank
+enddef
+
+def Test_disassemble_yank_range()
+ let res = execute('disass s:YankRange')
+ assert_match('<SNR>\d*_YankRange.*' ..
+ ' norm! m\[jjm\]\_s*' ..
+ '\d EXEC norm! m\[jjm\]\_s*' ..
+ ' :''\[,''\]yank\_s*' ..
+ '\d EXEC :''\[,''\]yank\_s*' ..
+ '\d PUSHNR 0\_s*' ..
'\d RETURN',
res)
enddef
diff --git a/src/version.c b/src/version.c
index 6edd5ec2e..63c9c3d30 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1427,
+/**/
1426,
/**/
1425,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 88108f498..dfcff508f 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -6567,7 +6567,7 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
* 'text'->func() should not be confused with 'a mark
*/
cmd = ea.cmd;
- if (*cmd != '\'')
+ if (*cmd != '\'' || starts_with_colon)
{
ea.cmd = skip_range(ea.cmd, NULL);
if (ea.cmd > cmd && !starts_with_colon)