mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1218: Vim9: cannot use 'text'->func()
Problem: Vim9: cannot use 'text'->func(). Solution: Recognize string at start of command.
This commit is contained in:
@@ -7048,13 +7048,17 @@ compile_def_function(ufunc_T *ufunc, int set_return_type, cctx_T *outer_cctx)
|
||||
|
||||
/*
|
||||
* COMMAND after range
|
||||
* 'text'->func() should not be confused with 'a mark
|
||||
*/
|
||||
cmd = ea.cmd;
|
||||
ea.cmd = skip_range(ea.cmd, NULL);
|
||||
if (ea.cmd > cmd && !starts_with_colon)
|
||||
if (*cmd != '\'')
|
||||
{
|
||||
emsg(_(e_colon_required));
|
||||
goto erret;
|
||||
ea.cmd = skip_range(ea.cmd, NULL);
|
||||
if (ea.cmd > cmd && !starts_with_colon)
|
||||
{
|
||||
emsg(_(e_colon_required));
|
||||
goto erret;
|
||||
}
|
||||
}
|
||||
p = find_ex_command(&ea, NULL, starts_with_colon ? NULL
|
||||
: (void *(*)(char_u *, size_t, cctx_T *))lookup_local,
|
||||
|
Reference in New Issue
Block a user