0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.1081: using "->" with split lines does not always work

Problem:    Using "->" with split lines does not always work.
Solution:   Avoid trying to get another line. (closes #11723)
This commit is contained in:
Bram Moolenaar
2022-12-19 20:28:38 +00:00
parent afa3f1cc72
commit 34820944ed
3 changed files with 70 additions and 3 deletions

View File

@@ -4548,11 +4548,19 @@ eval_method(
if (**arg != '(' && alias == NULL
&& (paren = vim_strchr(*arg, '(')) != NULL)
{
char_u *deref;
*arg = name;
// Truncate the name a the "(". Avoid trying to get another line
// by making "getline" NULL.
*paren = NUL;
deref = deref_function_name(arg, &tofree, evalarg, verbose);
char_u *(*getline)(int, void *, int, getline_opt_T) = NULL;
if (evalarg != NULL)
{
getline = evalarg->eval_getline;
evalarg->eval_getline = NULL;
}
char_u *deref = deref_function_name(arg, &tofree, evalarg, verbose);
if (deref == NULL)
{
*arg = name + len;
@@ -4563,7 +4571,10 @@ eval_method(
name = deref;
len = (long)STRLEN(name);
}
*paren = '(';
if (getline != NULL)
evalarg->eval_getline = getline;
}
if (ret == OK)