patch 8.0.1807: function to set terminal name is too long

Problem:    Function to set terminal name is too long.
Solution:   Refactor the function.  Fix typo in test.
diff --git a/src/version.c b/src/version.c
index 5ebf701..147f4ed 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1807,
+/**/
     1806,
 /**/
     1805,