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