Patch 8.2.2148
Problem: Vim9: crash when user command doesn't match.
Solution: Adjust command index. (closes #7479)
Files: src/ex_docmd.c, src/testdir/test_vim9_cmd.vim
*** ../vim-8.2.2147/src/ex_docmd.c 2020-12-13 19:22:23.924419826 +0100
--- src/ex_docmd.c 2020-12-16 21:39:58.239901096 +0100
***************
*** 3520,3526 ****
++p;
p = find_ucmd(eap, p, full, NULL, NULL);
}
! if (p == eap->cmd)
eap->cmdidx = CMD_SIZE;
}
--- 3520,3526 ----
++p;
p = find_ucmd(eap, p, full, NULL, NULL);
}
! if (p == NULL || p == eap->cmd)
eap->cmdidx = CMD_SIZE;
}
*** ../vim-8.2.2147/src/testdir/test_vim9_cmd.vim 2020-12-14
18:31:24.062840347 +0100
--- src/testdir/test_vim9_cmd.vim 2020-12-16 21:41:57.139527589 +0100
***************
*** 701,705 ****
--- 701,714 ----
delete('Xfile')
enddef
+ def Test_ambiguous_user_cmd()
+ var lines =<< trim END
+ com Cmd1 eval 0
+ com Cmd2 eval 0
+ Cmd
+ END
+ CheckScriptFailure(lines, 'E464:')
+ enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
*** ../vim-8.2.2147/src/version.c 2020-12-16 21:02:51.642934141 +0100
--- src/version.c 2020-12-16 21:43:02.391322623 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2148,
/**/
--
CART DRIVER: Bring out your dead!
We follow the cart through a wretched, impoverished plague-ridden village.
A few starved mongrels run about in the mud scavenging. In the open
doorway of one house perhaps we jug glimpse a pair of legs dangling from
the ceiling. In another doorway an OLD WOMAN is beating a cat against a
wall rather like one does with a mat. The cart passes round a dead donkey
or cow in the mud. And a MAN tied to a cart is being hammered to death by
four NUNS with huge mallets.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202012162044.0BGKiI8g747284%40masaka.moolenaar.net.