mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.0907: when using :global clipboard isn't set correctly
Problem: When using :global clipboard isn't set correctly. Solution: Set "clip_unnamed_saved" instead of "clip_unnamed". (Christian Brabandt, closes #6203, closes #6198)
This commit is contained in:
@@ -1317,7 +1317,12 @@ check_clipboard_option(void)
|
|||||||
}
|
}
|
||||||
if (errmsg == NULL)
|
if (errmsg == NULL)
|
||||||
{
|
{
|
||||||
clip_unnamed = new_unnamed;
|
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_star = new_autoselect_star;
|
||||||
clip_autoselect_plus = new_autoselect_plus;
|
clip_autoselect_plus = new_autoselect_plus;
|
||||||
clip_autoselectml = new_autoselectml;
|
clip_autoselectml = new_autoselectml;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
source check.vim
|
||||||
|
|
||||||
func Test_yank_put_clipboard()
|
func Test_yank_put_clipboard()
|
||||||
new
|
new
|
||||||
@@ -13,6 +14,16 @@ func Test_yank_put_clipboard()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
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()
|
func Test_nested_global()
|
||||||
new
|
new
|
||||||
call setline(1, ['nothing', 'found', 'found bad', 'bad'])
|
call setline(1, ['nothing', 'found', 'found bad', 'bad'])
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
907,
|
||||||
/**/
|
/**/
|
||||||
906,
|
906,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user