mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 17:11:48 +00:00
vim-patch:9.1.1535: the maximum search count uses hard-coded value 99 (#34873)
Problem: The maximum search count uses a hard-coded value of 99
(Andres Monge, Joschua Kesper)
Solution: Make it configurable using the 'maxsearchcount' option.
related: vim/vim#8855
fixes: vim/vim#17527
closes: vim/vim#17695
b7b7fa04bf
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -233,6 +233,7 @@ OPTIONS
|
||||
• 'completeopt' flag "nearset" sorts completion results by distance to cursor.
|
||||
• 'diffopt' `inline:` configures diff highlighting for changes within a line.
|
||||
• 'grepformat' is now a |global-local| option.
|
||||
• 'maxsearchcount' sets maximum value for |searchcount()| and defaults to 999.
|
||||
• 'pummaxwidth' sets maximum width for the completion popup menu.
|
||||
• 'winborder' "bold" style, custom border style.
|
||||
• |g:clipboard| accepts a string name to force any builtin clipboard tool.
|
||||
@@ -296,7 +297,6 @@ These existing features changed their behavior.
|
||||
• 'spellfile' location defaults to `stdpath("data").."/site/spell/"` instead of
|
||||
the first writable directory in 'runtimepath'.
|
||||
• |vim.version.range()| doesn't exclude `to` if it is equal to `from`.
|
||||
• |searchcount()|'s maximal value is raised from 99 to 999.
|
||||
|
||||
==============================================================================
|
||||
REMOVED FEATURES *news-removed*
|
||||
|
||||
@@ -4286,6 +4286,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Vim may run out of memory before hitting the 'maxmempattern' limit, in
|
||||
which case you get an "Out of memory" error instead.
|
||||
|
||||
*'maxsearchcount'* *'msc'*
|
||||
'maxsearchcount' 'msc' number (default 999)
|
||||
global
|
||||
Maximum number of matches shown for the search count status |shm-S|
|
||||
When the number of matches exceeds this value, Vim shows ">" instead
|
||||
of the exact count to keep searching fast.
|
||||
Note: larger values may impact performance.
|
||||
The value must be between 1 and 9999.
|
||||
|
||||
*'menuitems'* *'mis'*
|
||||
'menuitems' 'mis' number (default 25)
|
||||
global
|
||||
@@ -5681,7 +5690,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
is shown), the "search hit BOTTOM, continuing at TOP" and
|
||||
"search hit TOP, continuing at BOTTOM" messages are only
|
||||
indicated by a "W" (Mnemonic: Wrapped) letter before the
|
||||
search count statistics.
|
||||
search count statistics. The maximum limit can be set with
|
||||
the 'maxsearchcount' option.
|
||||
|
||||
This gives you the opportunity to avoid that a change between buffers
|
||||
requires you to hit <Enter>, but still gives as useful a message as
|
||||
|
||||
@@ -176,6 +176,7 @@ The following options affect how a search is performed in Vim:
|
||||
'ignorecase' ignore case when searching
|
||||
'imsearch' use IME when entering the search pattern
|
||||
'incsearch' show matches incrementally as the pattern is typed
|
||||
'maxsearchcount' maximum number for the search count |shm-S|
|
||||
'shortmess' suppress messages |shm-s|; show search count |shm-S|
|
||||
'smartcase' override 'ignorecase' if pattern contains uppercase
|
||||
'wrapscan' continue searching from the start of the file
|
||||
|
||||
@@ -69,6 +69,7 @@ Defaults *defaults* *nvim-defaults*
|
||||
- 'langremap' is disabled
|
||||
- 'laststatus' defaults to 2 (statusline is always shown)
|
||||
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
|
||||
- 'maxsearchcount' defaults t0 999
|
||||
- 'mouse' defaults to "nvi", see |default-mouse| for details
|
||||
- 'mousemodel' defaults to "popup_setpos"
|
||||
- 'nrformats' defaults to "bin,hex"
|
||||
@@ -340,7 +341,6 @@ Functions:
|
||||
- |matchadd()| can be called before highlight group is defined
|
||||
- |tempname()| tries to recover if the Nvim |tempdir| disappears.
|
||||
- |writefile()| with "p" flag creates parent directories.
|
||||
- |searchcount()|'s maximal value is raised from 99 to 999.
|
||||
- |prompt_getinput()|
|
||||
|
||||
Highlight groups:
|
||||
|
||||
15
runtime/lua/vim/_meta/options.lua
generated
15
runtime/lua/vim/_meta/options.lua
generated
@@ -4351,6 +4351,18 @@ vim.o.mmp = vim.o.maxmempattern
|
||||
vim.go.maxmempattern = vim.o.maxmempattern
|
||||
vim.go.mmp = vim.go.maxmempattern
|
||||
|
||||
--- Maximum number of matches shown for the search count status `shm-S`
|
||||
--- When the number of matches exceeds this value, Vim shows ">" instead
|
||||
--- of the exact count to keep searching fast.
|
||||
--- Note: larger values may impact performance.
|
||||
--- The value must be between 1 and 9999.
|
||||
---
|
||||
--- @type integer
|
||||
vim.o.maxsearchcount = 999
|
||||
vim.o.msc = vim.o.maxsearchcount
|
||||
vim.go.maxsearchcount = vim.o.maxsearchcount
|
||||
vim.go.msc = vim.go.maxsearchcount
|
||||
|
||||
--- Maximum number of items to use in a menu. Used for menus that are
|
||||
--- generated from a list of items, e.g., the Buffers menu. Changing this
|
||||
--- option has no direct effect, the menu must be refreshed first.
|
||||
@@ -6004,7 +6016,8 @@ vim.bo.sw = vim.bo.shiftwidth
|
||||
--- is shown), the "search hit BOTTOM, continuing at TOP" and
|
||||
--- "search hit TOP, continuing at BOTTOM" messages are only
|
||||
--- indicated by a "W" (Mnemonic: Wrapped) letter before the
|
||||
--- search count statistics.
|
||||
--- search count statistics. The maximum limit can be set with
|
||||
--- the 'maxsearchcount' option.
|
||||
---
|
||||
--- This gives you the opportunity to avoid that a change between buffers
|
||||
--- requires you to hit <Enter>, but still gives as useful a message as
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Apr 24
|
||||
" Last Change: 2025 Jul 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
@@ -261,6 +261,8 @@ call <SID>AddOption("ignorecase", gettext("ignore case when using a search patte
|
||||
call <SID>BinOptionG("ic", &ic)
|
||||
call <SID>AddOption("smartcase", gettext("override 'ignorecase' when pattern has upper case characters"))
|
||||
call <SID>BinOptionG("scs", &scs)
|
||||
call <SID>AddOption("maxsearchcount", gettext("Maximum number for the search count feature"))
|
||||
call <SID>OptionG("msc", &msc)
|
||||
call <SID>AddOption("casemap", gettext("what method to use for changing case of letters"))
|
||||
call <SID>OptionG("cmp", &cmp)
|
||||
call <SID>AddOption("maxmempattern", gettext("maximum amount of memory in Kbyte used for pattern matching"))
|
||||
|
||||
Reference in New Issue
Block a user