Karsten Hopp e8f0ea
To: vim_dev@googlegroups.com
Karsten Hopp e8f0ea
Subject: Patch 7.4.445
Karsten Hopp e8f0ea
Fcc: outbox
Karsten Hopp e8f0ea
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp e8f0ea
Mime-Version: 1.0
Karsten Hopp e8f0ea
Content-Type: text/plain; charset=UTF-8
Karsten Hopp e8f0ea
Content-Transfer-Encoding: 8bit
Karsten Hopp e8f0ea
------------
Karsten Hopp e8f0ea
Karsten Hopp e8f0ea
Patch 7.4.445
Karsten Hopp e8f0ea
Problem:    Clipboard may be cleared on startup.
Karsten Hopp e8f0ea
Solution:   Set clip_did_set_selection to -1 during startup. (Christian
Karsten Hopp e8f0ea
	    Brabandt)
Karsten Hopp e8f0ea
Files:	    src/main.c, src/ui.c
Karsten Hopp e8f0ea
Karsten Hopp e8f0ea
Karsten Hopp e8f0ea
*** ../vim-7.4.444/src/main.c	2014-09-09 17:47:34.584544079 +0200
Karsten Hopp e8f0ea
--- src/main.c	2014-09-19 13:38:29.802398710 +0200
Karsten Hopp e8f0ea
***************
Karsten Hopp e8f0ea
*** 958,965 ****
Karsten Hopp e8f0ea
--- 958,974 ----
Karsten Hopp e8f0ea
      if (p_im)
Karsten Hopp e8f0ea
  	need_start_insertmode = TRUE;
Karsten Hopp e8f0ea
  
Karsten Hopp e8f0ea
+ #ifdef FEAT_CLIPBOARD
Karsten Hopp e8f0ea
+     if (clip_unnamed)
Karsten Hopp e8f0ea
+        /* do not overwrite system clipboard while starting up */
Karsten Hopp e8f0ea
+        clip_did_set_selection = -1;
Karsten Hopp e8f0ea
+ #endif
Karsten Hopp e8f0ea
  #ifdef FEAT_AUTOCMD
Karsten Hopp e8f0ea
      apply_autocmds(EVENT_VIMENTER, NULL, NULL, FALSE, curbuf);
Karsten Hopp e8f0ea
+ # ifdef FEAT_CLIPBOARD
Karsten Hopp e8f0ea
+     if (clip_did_set_selection < 0)
Karsten Hopp e8f0ea
+        clip_did_set_selection = TRUE;
Karsten Hopp e8f0ea
+ # endif
Karsten Hopp e8f0ea
      TIME_MSG("VimEnter autocommands");
Karsten Hopp e8f0ea
  #endif
Karsten Hopp e8f0ea
  
Karsten Hopp e8f0ea
*** ../vim-7.4.444/src/ui.c	2014-08-06 18:17:03.475147780 +0200
Karsten Hopp e8f0ea
--- src/ui.c	2014-09-19 13:39:48.442398882 +0200
Karsten Hopp e8f0ea
***************
Karsten Hopp e8f0ea
*** 571,577 ****
Karsten Hopp e8f0ea
  {
Karsten Hopp e8f0ea
      clip_unnamed_saved = clip_unnamed;
Karsten Hopp e8f0ea
  
Karsten Hopp e8f0ea
!     if (clip_did_set_selection)
Karsten Hopp e8f0ea
      {
Karsten Hopp e8f0ea
  	clip_unnamed = FALSE;
Karsten Hopp e8f0ea
  	clip_did_set_selection = FALSE;
Karsten Hopp e8f0ea
--- 571,577 ----
Karsten Hopp e8f0ea
  {
Karsten Hopp e8f0ea
      clip_unnamed_saved = clip_unnamed;
Karsten Hopp e8f0ea
  
Karsten Hopp e8f0ea
!     if (clip_did_set_selection > 0)
Karsten Hopp e8f0ea
      {
Karsten Hopp e8f0ea
  	clip_unnamed = FALSE;
Karsten Hopp e8f0ea
  	clip_did_set_selection = FALSE;
Karsten Hopp e8f0ea
***************
Karsten Hopp e8f0ea
*** 584,590 ****
Karsten Hopp e8f0ea
      void
Karsten Hopp e8f0ea
  end_global_changes()
Karsten Hopp e8f0ea
  {
Karsten Hopp e8f0ea
!     if (!clip_did_set_selection)
Karsten Hopp e8f0ea
      {
Karsten Hopp e8f0ea
  	clip_did_set_selection = TRUE;
Karsten Hopp e8f0ea
  	clip_unnamed = clip_unnamed_saved;
Karsten Hopp e8f0ea
--- 584,590 ----
Karsten Hopp e8f0ea
      void
Karsten Hopp e8f0ea
  end_global_changes()
Karsten Hopp e8f0ea
  {
Karsten Hopp e8f0ea
!     if (clip_did_set_selection == FALSE)  /* not when -1 */
Karsten Hopp e8f0ea
      {
Karsten Hopp e8f0ea
  	clip_did_set_selection = TRUE;
Karsten Hopp e8f0ea
  	clip_unnamed = clip_unnamed_saved;
Karsten Hopp e8f0ea
*** ../vim-7.4.444/src/version.c	2014-09-15 14:25:51.309650006 +0200
Karsten Hopp e8f0ea
--- src/version.c	2014-09-19 13:35:30.618398318 +0200
Karsten Hopp e8f0ea
***************
Karsten Hopp e8f0ea
*** 743,744 ****
Karsten Hopp e8f0ea
--- 743,746 ----
Karsten Hopp e8f0ea
  {   /* Add new patch number below this line */
Karsten Hopp e8f0ea
+ /**/
Karsten Hopp e8f0ea
+     445,
Karsten Hopp e8f0ea
  /**/
Karsten Hopp e8f0ea
Karsten Hopp e8f0ea
-- 
Karsten Hopp e8f0ea
hundred-and-one symptoms of being an internet addict:
Karsten Hopp e8f0ea
159. You get excited whenever discussing your hard drive.
Karsten Hopp e8f0ea
Karsten Hopp e8f0ea
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp e8f0ea
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp e8f0ea
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp e8f0ea
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///