summaryrefslogtreecommitdiff
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-23 21:35:48 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-23 21:35:48 +0200
commit99499b1c05f85f83876b828eea3f6e14f0f407b4 (patch)
tree88da7aeb6c66daf0c6555388952334efa8cb642e /src/vim.h
parent05b8b07e2770b66ab77fdb5e195cae809959bdab (diff)
downloadvim-git-99499b1c05f85f83876b828eea3f6e14f0f407b4.tar.gz
patch 8.1.1371: cannot recover from a swap filev8.1.1371
Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes #4369)
Diffstat (limited to 'src/vim.h')
-rw-r--r--src/vim.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/vim.h b/src/vim.h
index 153a8c6ed..57fbe36af 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -781,26 +781,27 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
#define WILD_ICASE 0x100
#define WILD_ALLLINKS 0x200
-/* Flags for expand_wildcards() */
-#define EW_DIR 0x01 /* include directory names */
-#define EW_FILE 0x02 /* include file names */
-#define EW_NOTFOUND 0x04 /* include not found names */
-#define EW_ADDSLASH 0x08 /* append slash to directory name */
-#define EW_KEEPALL 0x10 /* keep all matches */
-#define EW_SILENT 0x20 /* don't print "1 returned" from shell */
-#define EW_EXEC 0x40 /* executable files */
-#define EW_PATH 0x80 /* search in 'path' too */
-#define EW_ICASE 0x100 /* ignore case */
-#define EW_NOERROR 0x200 /* no error for bad regexp */
-#define EW_NOTWILD 0x400 /* add match with literal name if exists */
-#define EW_KEEPDOLLAR 0x800 /* do not escape $, $var is expanded */
-/* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
- * is used when executing commands and EW_SILENT for interactive expanding. */
-#define EW_ALLLINKS 0x1000 /* also links not pointing to existing file */
-#define EW_SHELLCMD 0x2000 /* called from expand_shellcmd(), don't check
- * if executable is in $PATH */
-#define EW_DODOT 0x4000 /* also files starting with a dot */
-#define EW_EMPTYOK 0x8000 /* no matches is not an error */
+// Flags for expand_wildcards()
+#define EW_DIR 0x01 // include directory names
+#define EW_FILE 0x02 // include file names
+#define EW_NOTFOUND 0x04 // include not found names
+#define EW_ADDSLASH 0x08 // append slash to directory name
+#define EW_KEEPALL 0x10 // keep all matches
+#define EW_SILENT 0x20 // don't print "1 returned" from shell
+#define EW_EXEC 0x40 // executable files
+#define EW_PATH 0x80 // search in 'path' too
+#define EW_ICASE 0x100 // ignore case
+#define EW_NOERROR 0x200 // no error for bad regexp
+#define EW_NOTWILD 0x400 // add match with literal name if exists
+#define EW_KEEPDOLLAR 0x800 // do not escape $, $var is expanded
+// Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
+// is used when executing commands and EW_SILENT for interactive expanding.
+#define EW_ALLLINKS 0x1000 // also links not pointing to existing file
+#define EW_SHELLCMD 0x2000 // called from expand_shellcmd(), don't check
+ // if executable is in $PATH
+#define EW_DODOT 0x4000 // also files starting with a dot
+#define EW_EMPTYOK 0x8000 // no matches is not an error
+#define EW_NOTENV 0x10000 // do not expand environment variables
/* Flags for find_file_*() functions. */
#define FINDFILE_FILE 0 /* only files */