summaryrefslogtreecommitdiff
path: root/src/clipboard.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-05 20:03:16 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-05 20:03:16 +0200
commit07188fc5ef2366a3b1952e8686a4031b44152d59 (patch)
treec6d6b8c9de203a2e5971fb5ac8e30220a6f3a600 /src/clipboard.c
parentea563cc22be043ff91dcbdf2878c3d1fd944e573 (diff)
downloadvim-git-07188fc5ef2366a3b1952e8686a4031b44152d59.tar.gz
patch 8.2.0907: when using :global clipboard isn't set correctlyv8.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)
Diffstat (limited to 'src/clipboard.c')
-rw-r--r--src/clipboard.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/clipboard.c b/src/clipboard.c
index 7a35112d2..5db13a0d2 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -1317,7 +1317,12 @@ check_clipboard_option(void)
}
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_plus = new_autoselect_plus;
clip_autoselectml = new_autoselectml;