patch 8.0.1748: CmdlineEnter command uses backslash instead of slash
Problem: CmdlineEnter command uses backslash instead of slash.
Solution: Don't treat the character as a file name. (closes #2837)
diff --git a/src/fileio.c b/src/fileio.c
index f02925b..700bd3e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -9524,6 +9524,12 @@
* ColorScheme, QuickFixCmd* or DirChanged */
if (event == EVENT_FILETYPE
|| event == EVENT_SYNTAX
+ || event == EVENT_CMDLINECHANGED
+ || event == EVENT_CMDLINEENTER
+ || event == EVENT_CMDLINELEAVE
+ || event == EVENT_CMDWINENTER
+ || event == EVENT_CMDWINLEAVE
+ || event == EVENT_CMDUNDEFINED
|| event == EVENT_FUNCUNDEFINED
|| event == EVENT_REMOTEREPLY
|| event == EVENT_SPELLFILEMISSING
@@ -9532,7 +9538,10 @@
|| event == EVENT_OPTIONSET
|| event == EVENT_QUICKFIXCMDPOST
|| event == EVENT_DIRCHANGED)
+ {
fname = vim_strsave(fname);
+ autocmd_fname_full = TRUE; /* don't expand it later */
+ }
else
fname = FullName_save(fname, FALSE);
}