patch 9.1.0843: too many strlen() calls in undo.c

Problem:  too many strlen() calls in undo.c
Solution: refactor code and remove strlen() calls, update test_undo.vim
          and close remaining open swap files (John Marriott)

closes: #15995

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/structs.h b/src/structs.h
index 47999a9..66d57e0 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -397,6 +397,8 @@
     char_u	*ul_line;	// text of the line
     long	ul_len;		// length of the line including NUL, plus text
 				// properties
+    colnr_T	ul_textlen;	// length of the line excluding NUL and any text
+				// properties
 } undoline_T;
 
 typedef struct u_entry u_entry_T;