mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
fix(cmd): :update does not write new, unmodified buffer #35929
Problem: update command does not write new buffers that have filenames but no corresponding file on disk, even when using ++p flag. Solution: allow update to write when buffer has filename but file doesn't exist.
This commit is contained in:
@@ -1772,7 +1772,7 @@ void ex_file(exarg_T *eap)
|
||||
/// ":update".
|
||||
void ex_update(exarg_T *eap)
|
||||
{
|
||||
if (curbufIsChanged()) {
|
||||
if (curbufIsChanged() || (curbuf->b_ffname != NULL && !os_path_exists(curbuf->b_ffname))) {
|
||||
do_write(eap);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user