Included patch for persistent undo. Lots of changes and added test.
diff --git a/src/option.h b/src/option.h
index b49c0c4..f0ebc8d 100644
--- a/src/option.h
+++ b/src/option.h
@@ -815,6 +815,7 @@
# define TTYM_JSBTERM 0x10
# define TTYM_PTERM 0x20
#endif
+EXTERN char_u *p_udir; /* 'undodir' */
EXTERN long p_ul; /* 'undolevels' */
EXTERN long p_uc; /* 'updatecount' */
EXTERN long p_ut; /* 'updatetime' */
@@ -1004,6 +1005,7 @@
, BV_TS
, BV_TW
, BV_TX
+ , BV_UDF
, BV_WM
, BV_COUNT /* must be the last one */
};