forked from aniani/vim
patch 9.1.0911: Variable name for 'messagesopt' doesn't match short name
Problem: Variable name for 'messagesopt' doesn't match short name
(after v9.1.0908)
Solution: Change p_meo to p_mopt. Add more details to docs.
(zeertzjq)
closes: #16182
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
d9e9f89e0f
commit
8cc43daee1
@@ -1093,7 +1093,7 @@ messagesopt_changed(void)
|
||||
int messages_wait_new = 0;
|
||||
int messages_history_new = 0;
|
||||
|
||||
p = p_meo;
|
||||
p = p_mopt;
|
||||
while (*p != NUL)
|
||||
{
|
||||
if (STRNCMP(p, MESSAGES_OPT_HIT_ENTER,
|
||||
|
||||
@@ -775,7 +775,7 @@ EXTERN long p_mmt; // 'maxmemtot'
|
||||
#ifdef FEAT_MENU
|
||||
EXTERN long p_mis; // 'menuitems'
|
||||
#endif
|
||||
EXTERN char_u *p_meo; // 'messagesopt'
|
||||
EXTERN char_u *p_mopt; // 'messagesopt'
|
||||
#ifdef FEAT_SPELL
|
||||
EXTERN char_u *p_msm; // 'mkspellmem'
|
||||
#endif
|
||||
|
||||
@@ -1696,7 +1696,7 @@ static struct vimoption options[] =
|
||||
(char_u *)NULL, PV_NONE, NULL, NULL,
|
||||
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
|
||||
{"messagesopt","mopt", P_STRING|P_ALLOCED|P_VI_DEF|P_ONECOMMA|P_COLON|P_NODUP,
|
||||
(char_u *)&p_meo, PV_NONE, did_set_messagesopt, expand_set_messagesopt,
|
||||
(char_u *)&p_mopt, PV_NONE, did_set_messagesopt, expand_set_messagesopt,
|
||||
{(char_u *)"hit-enter,history:500", (char_u *)NULL} SCTX_INIT},
|
||||
{"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
|
||||
#ifdef FEAT_SPELL
|
||||
|
||||
@@ -3055,11 +3055,11 @@ did_set_messagesopt(optset_T *args UNUSED)
|
||||
int
|
||||
expand_set_messagesopt(optexpand_T *args, int *numMatches, char_u ***matches)
|
||||
{
|
||||
static char *(p_meo_values[]) = {"hit-enter", "wait:", "history:", NULL};
|
||||
static char *(p_mopt_values[]) = {"hit-enter", "wait:", "history:", NULL};
|
||||
return expand_set_opt_string(
|
||||
args,
|
||||
p_meo_values,
|
||||
ARRAY_LENGTH(p_meo_values) - 1,
|
||||
p_mopt_values,
|
||||
ARRAY_LENGTH(p_mopt_values) - 1,
|
||||
numMatches,
|
||||
matches);
|
||||
}
|
||||
|
||||
@@ -692,12 +692,12 @@ func Test_messagesopt_wait()
|
||||
|
||||
" Check hit-enter prompt
|
||||
call term_sendkeys(buf, ":set messagesopt=hit-enter,history:500\n")
|
||||
call term_sendkeys(buf, ":echo 'foo' | echo 'bar' echo 'baz'\n")
|
||||
call term_sendkeys(buf, ":echo 'foo' | echo 'bar' | echo 'baz'\n")
|
||||
call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))})
|
||||
|
||||
" Check no hit-enter prompt when "wait:" is set
|
||||
call term_sendkeys(buf, ":set messagesopt=wait:100,history:500\n")
|
||||
call term_sendkeys(buf, ":echo 'foo' | echo 'bar' echo 'baz'\n")
|
||||
call term_sendkeys(buf, ":echo 'foo' | echo 'bar' | echo 'baz'\n")
|
||||
call WaitForAssert({-> assert_equal(' 0,0-1 All', term_getline(buf, 6))})
|
||||
|
||||
" clean up
|
||||
|
||||
@@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
911,
|
||||
/**/
|
||||
910,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user