vim-patch:9.1.0766: too many strlen() calls in ex_getln.c (#30715)

Problem:  too many strlen() calls in ex_getln.c
Solution: refactor the code to reduce the number of strlen() calls
          (John Marriott)

closes: vim/vim#15809

ccf8907570

Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
zeertzjq
2024-10-08 08:43:44 +08:00
committed by GitHub
parent 60e1862ccb
commit f659699a26
2 changed files with 56 additions and 35 deletions

View File

@@ -380,6 +380,11 @@ char *last_search_pattern(void)
return spats[RE_SEARCH].pat;
}
size_t last_search_pattern_len(void)
{
return spats[RE_SEARCH].patlen;
}
/// Return true when case should be ignored for search pattern "pat".
/// Uses the 'ignorecase' and 'smartcase' options.
int ignorecase(char *pat)