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

It is strange that Ex commands that explicitly interact with the
clipboard show provider warning, but Normal mode commands do not.
This commit is contained in:
zeertzjq
2023-01-04 07:17:54 +08:00
committed by GitHub
parent d56c603caf
commit 5529b07316
2 changed files with 49 additions and 5 deletions

View File

@@ -6433,7 +6433,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