]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.314 v7.4.314
authorBram Moolenaar <Bram@vim.org>
Wed, 28 May 2014 19:40:52 +0000 (21:40 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 28 May 2014 19:40:52 +0000 (21:40 +0200)
Problem:    Completion messages can get in the way of a plugin.
Solution:   Add 'c' flag to 'shortmess' option. (Shougo Matsu)

runtime/doc/options.txt
src/edit.c
src/option.h
src/screen.c
src/version.c

index 7c772dfcc1900ac6892444bd01de6c4c968deeee..f2e6e66cc7b30d0553e536d017a90ab82a89066d 100644 (file)
@@ -6254,6 +6254,9 @@ A jump table for the options with a short description can be found at |Q_op|.
          A     don't give the "ATTENTION" message when an existing swap file
                is found.
          I     don't give the intro message when starting Vim |:intro|.
+         c     don't give |ins-completion-menu| messages.  For example,
+               "-- XXX completion (YYY)", "match 1 of 2", "The only match",
+               "Pattern not found", "Back at original", etc.
 
        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
index a0ad9aaed7bd98de20e88926ff8f000cc6aed1c6..94ec789769b0cb6a31ffa7f5795e780f243eb1aa 100644 (file)
@@ -3854,7 +3854,8 @@ ins_compl_prep(c)
            ins_compl_free();
            compl_started = FALSE;
            compl_matches = 0;
-           msg_clr_cmdline();          /* necessary for "noshowmode" */
+           if (!shortmess(SHM_COMPLETIONMENU))
+               msg_clr_cmdline();      /* necessary for "noshowmode" */
            ctrl_x_mode = 0;
            compl_enter_selects = FALSE;
            if (edit_submode != NULL)
@@ -5285,7 +5286,8 @@ ins_complete(c)
            {
                ctrl_x_mode = 0;
                edit_submode = NULL;
-               msg_clr_cmdline();
+               if (!shortmess(SHM_COMPLETIONMENU))
+                   msg_clr_cmdline();
                return FAIL;
            }
 
@@ -5544,15 +5546,18 @@ ins_complete(c)
 
     /* Show a message about what (completion) mode we're in. */
     showmode();
-    if (edit_submode_extra != NULL)
+    if (!shortmess(SHM_COMPLETIONMENU))
     {
-       if (!p_smd)
-           msg_attr(edit_submode_extra,
-                   edit_submode_highl < HLF_COUNT
-                   ? hl_attr(edit_submode_highl) : 0);
+       if (edit_submode_extra != NULL)
+       {
+           if (!p_smd)
+               msg_attr(edit_submode_extra,
+                       edit_submode_highl < HLF_COUNT
+                       ? hl_attr(edit_submode_highl) : 0);
+       }
+       else
+           msg_clr_cmdline();  /* necessary for "noshowmode" */
     }
-    else
-       msg_clr_cmdline();      /* necessary for "noshowmode" */
 
     /* Show the popup menu, unless we got interrupted. */
     if (!compl_interrupted)
index 4ccde58a2bc1ecd793941f53003c555fd6a2e055..dc566294847b3d09ef4925cc817da87755417e23 100644 (file)
 #define SHM_SEARCH     's'             /* no search hit bottom messages */
 #define SHM_ATTENTION  'A'             /* no ATTENTION messages */
 #define SHM_INTRO      'I'             /* intro messages */
-#define SHM_ALL                "rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */
+#define SHM_COMPLETIONMENU  'c'                /* completion menu messages */
+#define SHM_ALL                "rmfixlnwaWtToOsAIc" /* all possible flags for 'shm' */
 
 /* characters for p_go: */
 #define GO_ASEL                'a'             /* autoselect */
index aea3f75a49ec91f27358af2968505c5e29d21594..87b12591101e4e483e46a10a9f17e6df33869aa6 100644 (file)
@@ -42,7 +42,7 @@
  *
  * The part of the buffer that is displayed in a window is set with:
  * - w_topline (first buffer line in window)
- * - w_topfill (filler line above the first line)
+ * - w_topfill (filler lines above the first line)
  * - w_leftcol (leftmost window cell in window),
  * - w_skipcol (skipped window cells of first line)
  *
@@ -9683,7 +9683,8 @@ showmode()
            }
 #endif
 #ifdef FEAT_INS_EXPAND
-           if (edit_submode != NULL)           /* CTRL-X in Insert mode */
+           /* CTRL-X in Insert mode */
+           if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU))
            {
                /* These messages can get long, avoid a wrap in a narrow
                 * window.  Prefer showing edit_submode_extra. */
index dc5988be506524017f025df17007fb3b8f15c91c..0ebf14d65d3fed1ce5bcf97eb8dc26fa5ec6cf18 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    314,
 /**/
     313,
 /**/