patch 8.2.4166: undo synced when switching buffer in another window

Problem:    Undo synced when switching buffer in another window.
Solution:   Do not sync undo when not needed. (closes #9575)
diff --git a/src/version.c b/src/version.c
index 350b7e1..eaeb0a1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4166,
+/**/
     4165,
 /**/
     4164,