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