diff options
author | ii14 <ii14@users.noreply.github.com> | 2022-07-26 19:44:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-26 19:44:56 +0100 |
commit | 1f0dc5e84f5cc530c0fb9d0789e3d42d644429d7 (patch) | |
tree | 75f0c41f9aa36e549a2f548f58b9dc6f42f46757 /src/ex_cmds.c | |
parent | 15b87b6610bfce0c6296bbbad019c944f88a74ca (diff) |
patch 9.0.0085: ":write" fails after ":file name" and the ":edit"v9.0.0085
Problem: ":write" fails after ":file name" and the ":edit".
Solution: Reset BF_NOTEDITED when using ":edit". (closes #10790)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 5253863c87..6e5e09fbf1 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -2973,6 +2973,11 @@ do_ecmd( // 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. */ |