diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-10-22 13:03:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-22 13:03:02 +0800 |
| commit | ca7855c5ba7025e512ffbbc060fcf928cc480c91 (patch) | |
| tree | a502fab4ab227ec35397bbdbd17ceca6b14588ed /src/nvim/ex_getln.c | |
| parent | 1b9dafa67ba98e360444832e1fddce1e96acc1d6 (diff) | |
| download | rneovim-ca7855c5ba7025e512ffbbc060fcf928cc480c91.tar.gz rneovim-ca7855c5ba7025e512ffbbc060fcf928cc480c91.tar.bz2 rneovim-ca7855c5ba7025e512ffbbc060fcf928cc480c91.zip | |
vim-patch:9.1.0798: too many strlen() calls in cmdhist.c (#30895)
Problem: too many strlen() calls in cmdhist.c
Solution: refactor code and remove strlen() calls
(John Marriott)
closes: vim/vim#15888
https://github.com/vim/vim/commit/8df07d0ca310a55e1540f7d234b536abee49abd4
Co-authored-by: John Marriott <basilisk@internode.on.net>
Diffstat (limited to 'src/nvim/ex_getln.c')
| -rw-r--r-- | src/nvim/ex_getln.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index b58a6b16f1..389e935557 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -1789,7 +1789,7 @@ static int command_line_browse_history(CommandLineState *s) plen = s->lookforlen; } else { p = get_histentry(s->histype)[s->hiscnt].hisstr; - plen = (int)strlen(p); + plen = (int)get_histentry(s->histype)[s->hiscnt].hisstrlen; } if (s->histype == HIST_SEARCH |