Patch 8.2.0907
Problem:    When using :global clipboard isn't set correctly.
Solution:   Set "clip_unnamed_saved" instead of "clip_unnamed". (Christian
            Brabandt, closes #6203, closes #6198)
Files:      src/clipboard.c, src/testdir/test_global.vim


*** ../vim-8.2.0906/src/clipboard.c     2020-04-12 19:37:13.506297291 +0200
--- src/clipboard.c     2020-06-05 19:57:08.566776395 +0200
***************
*** 1317,1323 ****
      }
      if (errmsg == NULL)
      {
!       clip_unnamed = new_unnamed;
        clip_autoselect_star = new_autoselect_star;
        clip_autoselect_plus = new_autoselect_plus;
        clip_autoselectml = new_autoselectml;
--- 1317,1328 ----
      }
      if (errmsg == NULL)
      {
!       if (global_busy)
!           // clip_unnamed will be reset to clip_unnamed_saved
!           // at end_global_changes
!           clip_unnamed_saved = new_unnamed;
!       else
!           clip_unnamed = new_unnamed;
        clip_autoselect_star = new_autoselect_star;
        clip_autoselect_plus = new_autoselect_plus;
        clip_autoselectml = new_autoselectml;
*** ../vim-8.2.0906/src/testdir/test_global.vim 2020-03-22 14:08:27.321399669 
+0100
--- src/testdir/test_global.vim 2020-06-05 20:00:38.534071463 +0200
***************
*** 1,3 ****
--- 1,4 ----
+ source check.vim
  
  func Test_yank_put_clipboard()
    new
***************
*** 12,17 ****
--- 13,28 ----
    set clipboard&
    bwipe!
  endfunc
+ 
+ func Test_global_set_clipboard()
+   CheckFeature clipboard_working
+   new
+   set clipboard=unnamedplus
+   let @+='clipboard' | g/^/set cb= | let @" = 'unnamed' | put
+   call assert_equal(['','unnamed'], getline(1, '$'))
+   set clipboard&
+   bwipe!
+ endfunc
  
  func Test_nested_global()
    new
*** ../vim-8.2.0906/src/version.c       2020-06-05 19:36:53.468217572 +0200
--- src/version.c       2020-06-05 19:59:09.866529941 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     907,
  /**/

-- 
This is an airconditioned room, do not open Windows.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202006051804.055I4Pj11061223%40masaka.moolenaar.net.

Raspunde prin e-mail lui