patch 9.1.0910: 'messagesopt' does not check max wait time
Problem: 'messagesopt' does not check max wait time
(after v9.1.0908)
Solution: Check for max wait value
(Shougo Matsushita)
closes: #16183
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/message.c b/src/message.c
index 34a2692..6b994e5 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1137,6 +1137,10 @@
if (messages_history_new > 10000)
return FAIL;
+ // "wait" must be <= 10000
+ if (messages_wait_new > 10000)
+ return FAIL;
+
msg_flags = messages_flags_new;
msg_wait = messages_wait_new;
diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim
index 8bfa57d..74f5ae5 100644
--- a/src/testdir/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -236,7 +236,8 @@
\ 'history:100,wait:100', 'history:0,wait:0',
\ 'hit-enter,history:1,wait:1'],
\ ['xxx', 'history:500', 'hit-enter,history:-1',
- \ 'hit-enter,history:10001', 'hit-enter']],
+ \ 'hit-enter,history:10001', 'history:0,wait:10001',
+ \ 'hit-enter']],
\ 'mkspellmem': [['10000,100,12'], ['', 'xxx', '10000,100']],
\ 'mouse': [['', 'n', 'v', 'i', 'c', 'h', 'a', 'r', 'nvi'],
\ ['xxx', 'n,v,i']],
diff --git a/src/version.c b/src/version.c
index e5d1eb1..9c29c4e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 910,
+/**/
909,
/**/
908,