patch 8.2.0670: cannot change window when evaluating 'completefunc'
Problem: Cannot change window when evaluating 'completefunc'.
Solution: Make a difference between not changing text or buffers and also
not changing window.
diff --git a/src/register.c b/src/register.c
index 2ad136b..e56149f 100644
--- a/src/register.c
+++ b/src/register.c
@@ -932,9 +932,9 @@
dict_set_items_ro(v_event);
recursive = TRUE;
- textlock++;
+ textwinlock++;
apply_autocmds(EVENT_TEXTYANKPOST, NULL, NULL, FALSE, curbuf);
- textlock--;
+ textwinlock--;
recursive = FALSE;
// Empty the dictionary, v:event is still valid