patch 8.0.1223: crash when using autocomplete and tab pages

Problem:    Crash when using autocomplete and tab pages.
Solution:   Check if the current tab changed. (Christian Brabandt, closes
            #2239)
diff --git a/src/misc1.c b/src/misc1.c
index f7789ff..eb893f6 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2313,7 +2313,8 @@
 
     /* Copy bytes after the changed character(s). */
     p = newp + col;
-    mch_memmove(p + newlen, oldp + col + oldlen,
+    if (linelen > col + oldlen)
+	mch_memmove(p + newlen, oldp + col + oldlen,
 					    (size_t)(linelen - col - oldlen));
 
     /* Insert or overwrite the new character. */