From 94c128184f926e6330973e5979fde320f04102f5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 22 Sep 2025 18:22:27 +0000 Subject: [PATCH] patch 9.1.1783: ins_compl_leader() too far away from ins_compl_leader_len() Problem: ins_compl_leader() defined too far away from ins_compl_leader_len() (after 9.1.1781). Solution: Move ins_compl_leader() just before ins_compl_leader_len(). Add missing "static" to eval0_simple_funccal() definition. (zeertzjq). closes: #18364 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/eval.c | 2 +- src/insexpand.c | 18 +++++++++--------- src/version.c | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/eval.c b/src/eval.c index 9895f10693..503623491c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3439,7 +3439,7 @@ may_call_simple_func( * Handle zero level expression with optimization for a simple function call. * Same arguments and return value as eval0(). */ - int + static int eval0_simple_funccal( char_u *arg, typval_T *rettv, diff --git a/src/insexpand.c b/src/insexpand.c index cd366febbd..65e7a95eb0 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -1057,6 +1057,15 @@ ins_compl_insert_bytes(char_u *p, int len) compl_ins_end_col = curwin->w_cursor.col; } +/* + * Get current completion leader + */ + char_u * +ins_compl_leader(void) +{ + return compl_leader.string != NULL ? compl_leader.string : compl_orig_text.string; +} + /* * Get current completion leader length */ @@ -1836,15 +1845,6 @@ ins_compl_show_pum(void) #define DICT_FIRST (1) // use just first element in "dict" #define DICT_EXACT (2) // "dict" is the exact name of a file -/* - * Get current completion leader - */ - char_u * -ins_compl_leader(void) -{ - return compl_leader.string != NULL ? compl_leader.string : compl_orig_text.string; -} - /* * Add any identifiers that match the given pattern "pat" in the list of * dictionary files "dict_start" to the list of completions. diff --git a/src/version.c b/src/version.c index 74dcf0e4fc..efea7d85f3 100644 --- a/src/version.c +++ b/src/version.c @@ -724,6 +724,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1783, /**/ 1782, /**/