]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1783: ins_compl_leader() too far away from ins_compl_leader_len() v9.1.1783
authorzeertzjq <zeertzjq@outlook.com>
Mon, 22 Sep 2025 18:22:27 +0000 (18:22 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 22 Sep 2025 18:22:27 +0000 (18:22 +0000)
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 <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/eval.c
src/insexpand.c
src/version.c

index 9895f10693b75a31904044060a690d17c4ca97ea..503623491c14ed55067b1a2bcaec673b2f994522 100644 (file)
@@ -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,
index cd366febbd52720e8fdd93db0e1cf4d62ab2e7f5..65e7a95eb051b332d679aeb69d31dde1f07bb61e 100644 (file)
@@ -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.
index 74dcf0e4fc8d34d9e0240672b880aa149b408279..efea7d85f36bf8d4ea89fed1eef7f7dc96329280 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1783,
 /**/
     1782,
 /**/