]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1478: Unused assignment in ex_uniq() v9.1.1478
authorzeertzjq <zeertzjq@outlook.com>
Tue, 24 Jun 2025 17:58:36 +0000 (19:58 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 24 Jun 2025 18:02:28 +0000 (20:02 +0200)
Problem:  Unused assignment in ex_uniq() (after v9.1.1476)
Solution: Remove the assignment and the wrong comments above
          (zeertzjq).

closes: #17596

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/ex_cmds.c
src/version.c

index cd2c3046f466e88bb5ea848662d9344378be3f72..c4a86c90e936e52f51a08d3314550b71fa8f2d88 100644 (file)
@@ -729,15 +729,9 @@ ex_uniq(exarg_T *eap)
        }
     }
 
-    // Make an array with all line numbers.  This avoids having to copy all
-    // the lines into allocated memory.
-    // When remove deplicating on strings "start_col_nr" is the offset in the
-    // line, for numbers remove deplicating it's the number to uniq on.  This
-    // means the pattern matching only has to be done once per line.
-    // Also get the longest line length for allocating "sortbuf".
+    // Find the length of the longest line.
     for (lnum = eap->line1; lnum <= eap->line2; ++lnum)
     {
-       s = ml_get(lnum);
        len = ml_get_len(lnum);
        if (maxlen < len)
            maxlen = len;
index df89e19d6c3e379c5d3dbf26a285fde0f95536c5..6db18c6181a55670e82d0df6b291f3d07642dcb9 100644 (file)
@@ -709,6 +709,10 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1478,
+/**/
+    1477,
 /**/
     1476,
 /**/