mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 10:55:40 +00:00
vim-patch:9.1.0426: too many strlen() calls in search.c
Problem: too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
use explicit variable to remember strlen
(John Marriott)
closes: vim/vim#14796
8c85a2a49a
Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
@@ -2902,7 +2902,7 @@ static void qf_jump_goto_line(linenr_T qf_lnum, int qf_col, char qf_viscol, char
|
||||
// Move the cursor to the first line in the buffer
|
||||
pos_T save_cursor = curwin->w_cursor;
|
||||
curwin->w_cursor.lnum = 0;
|
||||
if (!do_search(NULL, '/', '/', qf_pattern, 1, SEARCH_KEEP, NULL)) {
|
||||
if (!do_search(NULL, '/', '/', qf_pattern, strlen(qf_pattern), 1, SEARCH_KEEP, NULL)) {
|
||||
curwin->w_cursor = save_cursor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user