c5827dc
To: vim-dev@vim.org
c5827dc
Subject: Patch 7.0.142
c5827dc
Fcc: outbox
c5827dc
From: Bram Moolenaar <Bram@moolenaar.net>
c5827dc
Mime-Version: 1.0
c5827dc
Content-Type: text/plain; charset=ISO-8859-1
c5827dc
Content-Transfer-Encoding: 8bit
c5827dc
------------
c5827dc
c5827dc
Patch 7.0.142
c5827dc
Problem:    Using the middle mouse button in Select mode to paste text results 
c5827dc
            in an extra "y". (Kriton Kyrimis)
c5827dc
Solution:   Let the middle mouse button replace the selected text with the
c5827dc
            contents of the clipboard.
c5827dc
Files:      src/normal.c
c5827dc
c5827dc
c5827dc
*** ../vim-7.0.141/src/normal.c	Tue Oct 10 13:27:30 2006
c5827dc
--- src/normal.c	Tue Oct 17 16:54:57 2006
c5827dc
***************
c5827dc
*** 2380,2390 ****
c5827dc
  	    /*
c5827dc
  	     * If visual was active, yank the highlighted text and put it
c5827dc
  	     * before the mouse pointer position.
c5827dc
  	     */
c5827dc
  	    if (VIsual_active)
c5827dc
  	    {
c5827dc
! 		stuffcharReadbuff('y');
c5827dc
! 		stuffcharReadbuff(K_MIDDLEMOUSE);
c5827dc
  		do_always = TRUE;	/* ignore 'mouse' setting next time */
c5827dc
  		return FALSE;
c5827dc
  	    }
c5827dc
--- 2380,2399 ----
c5827dc
  	    /*
c5827dc
  	     * If visual was active, yank the highlighted text and put it
c5827dc
  	     * before the mouse pointer position.
c5827dc
+ 	     * In Select mode replace the highlighted text with the clipboard.
c5827dc
  	     */
c5827dc
  	    if (VIsual_active)
c5827dc
  	    {
c5827dc
! 		if (VIsual_select)
c5827dc
! 		{
c5827dc
! 		    stuffcharReadbuff(Ctrl_G);
c5827dc
! 		    stuffReadbuff("\"+p");
c5827dc
! 		}
c5827dc
! 		else
c5827dc
! 		{
c5827dc
! 		    stuffcharReadbuff('y');
c5827dc
! 		    stuffcharReadbuff(K_MIDDLEMOUSE);
c5827dc
! 		}
c5827dc
  		do_always = TRUE;	/* ignore 'mouse' setting next time */
c5827dc
  		return FALSE;
c5827dc
  	    }
c5827dc
*** ../vim-7.0.141/src/version.c	Tue Oct 17 16:26:52 2006
c5827dc
--- src/version.c	Tue Oct 17 16:51:23 2006
c5827dc
***************
c5827dc
*** 668,669 ****
c5827dc
--- 668,671 ----
c5827dc
  {   /* Add new patch number below this line */
c5827dc
+ /**/
c5827dc
+     142,
c5827dc
  /**/
c5827dc
c5827dc
-- 
c5827dc
Keyboard not found.  Think ENTER to continue.
c5827dc
c5827dc
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
c5827dc
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
c5827dc
\\\        download, build and distribute -- http://www.A-A-P.org        ///
c5827dc
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///