3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.314
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.314
3ef2ca
Problem:    Completion messages can get in the way of a plugin.
3ef2ca
Solution:   Add 'c' flag to 'shortmess' option. (Shougo Matsu)
3ef2ca
Files:	    runtime/doc/options.txt, src/edit.c, src/option.h, src/screen.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.313/runtime/doc/options.txt	2014-03-12 18:55:52.096906804 +0100
3ef2ca
--- runtime/doc/options.txt	2014-05-28 20:55:14.640305211 +0200
3ef2ca
***************
3ef2ca
*** 6252,6257 ****
3ef2ca
--- 6254,6262 ----
3ef2ca
  	  A	don't give the "ATTENTION" message when an existing swap file
3ef2ca
  		is found.
3ef2ca
  	  I	don't give the intro message when starting Vim |:intro|.
3ef2ca
+ 	  c	don't give |ins-completion-menu| messages.  For example,
3ef2ca
+ 		"-- XXX completion (YYY)", "match 1 of 2", "The only match",
3ef2ca
+ 		"Pattern not found", "Back at original", etc.
3ef2ca
  
3ef2ca
  	This gives you the opportunity to avoid that a change between buffers
3ef2ca
  	requires you to hit <Enter>, but still gives as useful a message as
3ef2ca
*** ../vim-7.4.313/src/edit.c	2014-04-29 14:44:31.515875819 +0200
3ef2ca
--- src/edit.c	2014-05-28 21:33:57.588325545 +0200
3ef2ca
***************
3ef2ca
*** 3854,3860 ****
3ef2ca
  	    ins_compl_free();
3ef2ca
  	    compl_started = FALSE;
3ef2ca
  	    compl_matches = 0;
3ef2ca
! 	    msg_clr_cmdline();		/* necessary for "noshowmode" */
3ef2ca
  	    ctrl_x_mode = 0;
3ef2ca
  	    compl_enter_selects = FALSE;
3ef2ca
  	    if (edit_submode != NULL)
3ef2ca
--- 3854,3861 ----
3ef2ca
  	    ins_compl_free();
3ef2ca
  	    compl_started = FALSE;
3ef2ca
  	    compl_matches = 0;
3ef2ca
! 	    if (!shortmess(SHM_COMPLETIONMENU))
3ef2ca
! 		msg_clr_cmdline();	/* necessary for "noshowmode" */
3ef2ca
  	    ctrl_x_mode = 0;
3ef2ca
  	    compl_enter_selects = FALSE;
3ef2ca
  	    if (edit_submode != NULL)
3ef2ca
***************
3ef2ca
*** 5285,5291 ****
3ef2ca
  	    {
3ef2ca
  		ctrl_x_mode = 0;
3ef2ca
  		edit_submode = NULL;
3ef2ca
! 		msg_clr_cmdline();
3ef2ca
  		return FAIL;
3ef2ca
  	    }
3ef2ca
  
3ef2ca
--- 5286,5293 ----
3ef2ca
  	    {
3ef2ca
  		ctrl_x_mode = 0;
3ef2ca
  		edit_submode = NULL;
3ef2ca
! 		if (!shortmess(SHM_COMPLETIONMENU))
3ef2ca
! 		    msg_clr_cmdline();
3ef2ca
  		return FAIL;
3ef2ca
  	    }
3ef2ca
  
3ef2ca
***************
3ef2ca
*** 5544,5558 ****
3ef2ca
  
3ef2ca
      /* Show a message about what (completion) mode we're in. */
3ef2ca
      showmode();
3ef2ca
!     if (edit_submode_extra != NULL)
3ef2ca
      {
3ef2ca
! 	if (!p_smd)
3ef2ca
! 	    msg_attr(edit_submode_extra,
3ef2ca
! 		    edit_submode_highl < HLF_COUNT
3ef2ca
! 		    ? hl_attr(edit_submode_highl) : 0);
3ef2ca
      }
3ef2ca
-     else
3ef2ca
- 	msg_clr_cmdline();	/* necessary for "noshowmode" */
3ef2ca
  
3ef2ca
      /* Show the popup menu, unless we got interrupted. */
3ef2ca
      if (!compl_interrupted)
3ef2ca
--- 5546,5563 ----
3ef2ca
  
3ef2ca
      /* Show a message about what (completion) mode we're in. */
3ef2ca
      showmode();
3ef2ca
!     if (!shortmess(SHM_COMPLETIONMENU))
3ef2ca
      {
3ef2ca
! 	if (edit_submode_extra != NULL)
3ef2ca
! 	{
3ef2ca
! 	    if (!p_smd)
3ef2ca
! 		msg_attr(edit_submode_extra,
3ef2ca
! 			edit_submode_highl < HLF_COUNT
3ef2ca
! 			? hl_attr(edit_submode_highl) : 0);
3ef2ca
! 	}
3ef2ca
! 	else
3ef2ca
! 	    msg_clr_cmdline();	/* necessary for "noshowmode" */
3ef2ca
      }
3ef2ca
  
3ef2ca
      /* Show the popup menu, unless we got interrupted. */
3ef2ca
      if (!compl_interrupted)
3ef2ca
*** ../vim-7.4.313/src/option.h	2014-03-23 15:12:29.943264337 +0100
3ef2ca
--- src/option.h	2014-05-28 21:34:25.244325787 +0200
3ef2ca
***************
3ef2ca
*** 212,218 ****
3ef2ca
  #define SHM_SEARCH	's'		/* no search hit bottom messages */
3ef2ca
  #define SHM_ATTENTION	'A'		/* no ATTENTION messages */
3ef2ca
  #define SHM_INTRO	'I'		/* intro messages */
3ef2ca
! #define SHM_ALL		"rmfixlnwaWtToOsAI" /* all possible flags for 'shm' */
3ef2ca
  
3ef2ca
  /* characters for p_go: */
3ef2ca
  #define GO_ASEL		'a'		/* autoselect */
3ef2ca
--- 212,219 ----
3ef2ca
  #define SHM_SEARCH	's'		/* no search hit bottom messages */
3ef2ca
  #define SHM_ATTENTION	'A'		/* no ATTENTION messages */
3ef2ca
  #define SHM_INTRO	'I'		/* intro messages */
3ef2ca
! #define SHM_COMPLETIONMENU  'c'		/* completion menu messages */
3ef2ca
! #define SHM_ALL		"rmfixlnwaWtToOsAIc" /* all possible flags for 'shm' */
3ef2ca
  
3ef2ca
  /* characters for p_go: */
3ef2ca
  #define GO_ASEL		'a'		/* autoselect */
3ef2ca
*** ../vim-7.4.313/src/screen.c	2014-05-22 16:05:16.338382204 +0200
3ef2ca
--- src/screen.c	2014-05-28 20:53:20.488304211 +0200
3ef2ca
***************
3ef2ca
*** 42,48 ****
3ef2ca
   *
3ef2ca
   * The part of the buffer that is displayed in a window is set with:
3ef2ca
   * - w_topline (first buffer line in window)
3ef2ca
!  * - w_topfill (filler line above the first line)
3ef2ca
   * - w_leftcol (leftmost window cell in window),
3ef2ca
   * - w_skipcol (skipped window cells of first line)
3ef2ca
   *
3ef2ca
--- 42,48 ----
3ef2ca
   *
3ef2ca
   * The part of the buffer that is displayed in a window is set with:
3ef2ca
   * - w_topline (first buffer line in window)
3ef2ca
!  * - w_topfill (filler lines above the first line)
3ef2ca
   * - w_leftcol (leftmost window cell in window),
3ef2ca
   * - w_skipcol (skipped window cells of first line)
3ef2ca
   *
3ef2ca
***************
3ef2ca
*** 9683,9689 ****
3ef2ca
  	    }
3ef2ca
  #endif
3ef2ca
  #ifdef FEAT_INS_EXPAND
3ef2ca
! 	    if (edit_submode != NULL)		/* CTRL-X in Insert mode */
3ef2ca
  	    {
3ef2ca
  		/* These messages can get long, avoid a wrap in a narrow
3ef2ca
  		 * window.  Prefer showing edit_submode_extra. */
3ef2ca
--- 9683,9690 ----
3ef2ca
  	    }
3ef2ca
  #endif
3ef2ca
  #ifdef FEAT_INS_EXPAND
3ef2ca
! 	    /* CTRL-X in Insert mode */
3ef2ca
! 	    if (edit_submode != NULL && !shortmess(SHM_COMPLETIONMENU))
3ef2ca
  	    {
3ef2ca
  		/* These messages can get long, avoid a wrap in a narrow
3ef2ca
  		 * window.  Prefer showing edit_submode_extra. */
3ef2ca
*** ../vim-7.4.313/src/version.c	2014-05-28 20:31:37.504292805 +0200
3ef2ca
--- src/version.c	2014-05-28 20:54:27.664304800 +0200
3ef2ca
***************
3ef2ca
*** 736,737 ****
3ef2ca
--- 736,739 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     314,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
hundred-and-one symptoms of being an internet addict:
3ef2ca
227. You sleep next to your monitor.  Or on top of it.
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///