fix(clipboard): show provider warning when not during batch changes

It is strange that Ex commands that explicitly interact with the
clipboard show provider warning, but Normal mode commands do not.

(cherry picked from commit c98571de2a)
This commit is contained in:
zeertzjq
2022-12-17 09:28:58 +08:00
committed by github-actions[bot]
parent 8bbed45e10
commit 384caf8c1c
2 changed files with 49 additions and 5 deletions

View File

@@ -6376,7 +6376,7 @@ static yankreg_T *adjust_clipboard_name(int *name, bool quiet, bool writing)
}
if (!eval_has_provider("clipboard")) {
if (batch_change_count == 1 && !quiet
if (batch_change_count <= 1 && !quiet
&& (!clipboard_didwarn || (explicit_cb_reg && !redirecting()))) {
clipboard_didwarn = true;
// Do NOT error (emsg()) here--if it interrupts :redir we get into