lkundrak / rpms / vim

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