patch 9.0.0085: ":write" fails after ":file name" and the ":edit"
Problem: ":write" fails after ":file name" and the ":edit".
Solution: Reset BF_NOTEDITED when using ":edit". (closes #10790)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 5253863..6e5e09f 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2973,6 +2973,11 @@
// Assume success now
retval = OK;
+ // If the file name was changed, reset the not-edit flag so that ":write"
+ // works.
+ if (!other_file)
+ curbuf->b_flags &= ~BF_NOTEDITED;
+
/*
* Check if we are editing the w_arg_idx file in the argument list.
*/