0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1427: Vim9: cannot use a range with marks in :def function

Problem:    Vim9: cannot use a range with marks in :def function.
Solution:   Parse range after colon. (closes #6686)
This commit is contained in:
Bram Moolenaar
2020-08-12 15:48:55 +02:00
parent a177344dc0
commit 7c5ad34878
3 changed files with 34 additions and 15 deletions

View File

@@ -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)