0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.1.0038: Unnecessary loop in getvcol()

Problem:  Unnecessary loop in getvcol().
Solution: Compare next char position with pos->col directly.
          (zeertzjq)

The loop below already handles end of line before checking for posptr,
and the next char is after pos->col whether pos->col is at the start or
in the middle of the char in question, so neither the NUL check nor the
mb_head_off() are needed when comparing the position of the next char
with pos->col directly.

closes: #13878

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2024-01-17 20:52:13 +01:00
committed by Christian Brabandt
parent 5b0722b864
commit 4ea37f88e8
2 changed files with 8 additions and 24 deletions

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
38,
/**/
37,
/**/