mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 19:39:53 +10:00
feat(search): increase MAX_COUNT to 999
Problem: "99 searchcount ought to be enough for anyone." Solution: Increase `SEARCH_STAT_DEF_MAX_COUNT` to 999, which I'm sure will suffice for the next twenty years. Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
This commit is contained in:
committed by
Christian Clason
parent
9784bc1346
commit
c9d8468020
6
runtime/lua/vim/_meta/vimfn.lua
generated
6
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -7664,11 +7664,11 @@ function vim.fn.search(pattern, flags, stopline, timeout, skip) end
|
||||
---
|
||||
--- To get the last search count when |n| or |N| was pressed, call
|
||||
--- this function with `recompute: 0` . This sometimes returns
|
||||
--- wrong information because |n| and |N|'s maximum count is 99.
|
||||
--- If it exceeded 99 the result must be max count + 1 (100). If
|
||||
--- wrong information because |n| and |N|'s maximum count is 999.
|
||||
--- If it exceeded 999 the result must be max count + 1 (1000). If
|
||||
--- you want to get correct information, specify `recompute: 1`: >vim
|
||||
---
|
||||
--- " result == maxcount + 1 (100) when many matches
|
||||
--- " result == maxcount + 1 (1000) when many matches
|
||||
--- let result = searchcount(#{recompute: 0})
|
||||
---
|
||||
--- " Below returns correct result (recompute defaults
|
||||
|
||||
Reference in New Issue
Block a user