diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-05-21 06:22:23 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-05-22 06:37:26 +0800 |
commit | b86381f425223adf0ff91fa0746914a5774ddabb (patch) | |
tree | 3a954980956a6ac250fc2e1a875802d5057bddde /src/nvim/quickfix.c | |
parent | 879d17ea8d62c199ea0c91c5f37a4f25495be7ce (diff) | |
download | rneovim-b86381f425223adf0ff91fa0746914a5774ddabb.tar.gz rneovim-b86381f425223adf0ff91fa0746914a5774ddabb.tar.bz2 rneovim-b86381f425223adf0ff91fa0746914a5774ddabb.zip |
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
https://github.com/vim/vim/commit/8c85a2a49acf80e4f53ec51e6ff2a5f3830eeddb
Co-authored-by: John Marriott <basilisk@internode.on.net>
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 2713dd2a45..e022184f2f 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -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; } } |