jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.445

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