]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0911: Variable name for 'messagesopt' doesn't match short name v9.1.0911
authorzeertzjq <zeertzjq@outlook.com>
Sat, 7 Dec 2024 15:09:08 +0000 (16:09 +0100)
committerChristian Brabandt <cb@256bit.org>
Sat, 7 Dec 2024 15:09:08 +0000 (16:09 +0100)
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>
runtime/doc/options.txt
runtime/optwin.vim
src/message.c
src/option.h
src/optiondefs.h
src/optionstr.c
src/testdir/test_messages.vim
src/version.c

index e2ce17612b5debb2b6e017073f2e248886732b80..4024d20c50d2fac21a012cdbdb7d0c571a934a50 100644 (file)
@@ -5638,22 +5638,24 @@ A jump table for the options with a short description can be found at |Q_op|.
 'messagesopt' 'mopt'   string  (default "hit-enter,history:500")
                        global
 
-       Option settings when outputting messages.  It can consist of the
+       Option settings for outputting messages.  It can consist of the
        following items.  Items must be separated by a comma.
 
-       hit-enter       Use |hit-enter| prompt when the message is longer than
+       hit-enter       Use |hit-enter| prompt when the message is longer than
                        'cmdheight' size.
 
-       wait:{n}        Ignored when "hit-enter" is present.  Instead of using
-                       |hit-enter| prompt, will simply wait for {n}
-                       milliseconds so the user has a chance to read the
-                       message, use 0 to disable sleep (but then the user may
-                       miss an important message).
-                       The maximum value is 10000.
+       wait:{n}        Instead of using a |hit-enter| prompt, simply wait for
+                       {n} milliseconds so that the user has a chance to read
+                       the message.  The maximum value of {n} is 10000.  Use
+                       0 to disable the wait (but then the user may miss an
+                       important message).
+                       This item is ignored when "hit-enter" is present, but
+                       required when "hit-enter" is not present.
 
        history:{n}     Determines how many entries are remembered in the
                        |:messages| history.  The maximum value is 10000.
                        Setting it to zero clears the message history.
+                       This item must always be present.
 
                                                *'mkspellmem'* *'msm'*
 'mkspellmem' 'msm'     string  (default "460000,2000,500")
index c3f917cc35bd57071de8b4b89deb776308d1054b..2b12f55901f36658cbcb21b7e9d1d93a457697be 100644 (file)
@@ -1,7 +1,7 @@
 " These commands create the option window.
 "
 " Maintainer:  The Vim Project <https://github.com/vim/vim>
-" Last Change: 2024 Jul 12
+" Last Change: 2024 Dec 07
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " If there already is an option window, jump to that one.
@@ -749,7 +749,7 @@ call <SID>AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show se
 call <SID>BinOptionG("terse", &terse)
 call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
 call <SID>OptionG("shm", &shm)
-call <SID>AddOption("messagesopt", gettext("Option settings when outputting messages"))
+call <SID>AddOption("messagesopt", gettext("options for outputting messages"))
 call <SID>OptionG("mopt", &mopt)
 call <SID>AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'"))
 let &sc = s:old_sc
index 6b994e5e40f40279ac53a77ec0aaf36951237da0..f0d1806c6037caaca32b45452f4c8e65e7e61535 100644 (file)
@@ -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,
index e747addf0b57e4284a3aca617cb68f73b5ec0b31..a3634a60236e0057b7480a24552de2d0ddf0ac2e 100644 (file)
@@ -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
index f42178b135ec7f7f53b5f9fac072b14f6d65a131..2d018976597456093ee777e373d79ee4b4542e5f 100644 (file)
@@ -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
index 08b235056cd1126c6e2e857d34f03d18fcddf84d..92474336a3d2565e797547983a05ec5ae9324644 100644 (file)
@@ -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);
 }
index 1b5f809c78194ebe78fc7b65a0d8519bfc55fee7..2dce6c64d9691be53e8123ece24f479ebd600be0 100644 (file)
@@ -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
index 9c29c4e97b83f2d6c05ec90a7385f50c49029526..81ebbae3e54b4475d05e1838381db4a633e95985 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    911,
 /**/
     910,
 /**/