1
0
forked from aniani/vim

patch 9.1.0168: too many STRLEN() calls

Problem:  too many STRLEN() calls
Solution: Make use of ml_get_len() calls instead
          (John Marriott)

closes: #14123

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
John Marriott
2024-03-11 22:04:45 +01:00
committed by Christian Brabandt
parent 5cd86c6cff
commit bfcc895482
6 changed files with 19 additions and 17 deletions

View File

@@ -4977,7 +4977,7 @@ ins_tab(void)
{
pos = curwin->w_cursor;
cursor = &pos;
saved_line = vim_strsave(ml_get_curline());
saved_line = vim_strnsave(ml_get_curline(), ml_get_curline_len());
if (saved_line == NULL)
return FALSE;
ptr = saved_line + pos.col;