patch 9.1.1535: the maximum search count uses hard-coded value 99
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: #8855
fixes: #17527
closes: #17695
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
23
src/option.c
23
src/option.c
@ -4138,6 +4138,29 @@ did_set_scrollbind(optset_T *args UNUSED)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Process the new 'maxsearchcount' option value.
|
||||
*/
|
||||
char *
|
||||
did_set_maxsearchcount(optset_T *args UNUSED)
|
||||
{
|
||||
char *errmsg = NULL;
|
||||
// if you increase this, also increase SEARCH_STAT_BUF_LEN in search.c
|
||||
#define MAX_SEARCH_COUNT 9999
|
||||
|
||||
if (p_msc <= 0)
|
||||
errmsg = e_argument_must_be_positive;
|
||||
else if (p_msc > MAX_SEARCH_COUNT)
|
||||
errmsg = e_invalid_argument;
|
||||
|
||||
if (errmsg != NULL)
|
||||
p_msc = 99;
|
||||
|
||||
return errmsg;
|
||||
#undef MAX_SEARCH_COUNT
|
||||
}
|
||||
|
||||
|
||||
#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
|
||||
/*
|
||||
* Process the updated 'shellslash' option value.
|
||||
|
||||
Reference in New Issue
Block a user