vim-patch:partial:9.1.0461: too many strlen() calls in drawline.c (#29150)

Problem:  too many strlen() calls in drawline.c
Solution: Refactor code to avoid strlen()
          (John Marriott)

closes: vim/vim#14890

f51ff96532

Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
zeertzjq
2024-06-03 05:38:06 +08:00
committed by GitHub
parent 0c9f7f5f96
commit 3a1515bfee

View File

@@ -1422,7 +1422,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s
line = ml_get_buf(wp->w_buffer, lnum); line = ml_get_buf(wp->w_buffer, lnum);
ptr = line + linecol; ptr = line + linecol;
if (len == 0 || (int)wp->w_cursor.col > ptr - line) { if (len == 0 || wp->w_cursor.col > linecol) {
// no bad word found at line start, don't check until end of a // no bad word found at line start, don't check until end of a
// word // word
spell_hlf = HLF_COUNT; spell_hlf = HLF_COUNT;