commit 11f8e8eb6316ca2c57a4a001bd20b0a3cb1af813 parent 7138cdaef84b1a49024fc08144a8c4f4bcb36265 Author: zeertzjq <zeertzjq@outlook.com> Date: Wed, 25 Jun 2025 07:31:22 +0800 vim-patch:9.1.1478: Unused assignment in ex_uniq() Problem: Unused assignment in ex_uniq() (after v9.1.1476) Solution: Remove the assignment and the wrong comments above (zeertzjq). closes: vim/vim#17596 https://github.com/vim/vim/commit/fc378a88d808ec1d44dd8582498c1b1b6af8e8d6 Diffstat:
| M | src/nvim/ex_cmds.c | | | 8 | +------- |
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c @@ -763,14 +763,8 @@ void 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 (linenr_T lnum = eap->line1; lnum <= eap->line2; lnum++) { - // char *s = ml_get(lnum); int len = ml_get_len(lnum); if (maxlen < len) { maxlen = len;