aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/ex_cmds2.c6
-rw-r--r--test/functional/ex_cmds/drop_spec.lua2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index fc50664ce0..d754150089 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -866,12 +866,12 @@ void ex_drop(exarg_T *eap)
const int save_ar = curbuf->b_p_ar;
// reload the file if it is newer
- curbuf->b_p_ar = 1;
+ curbuf->b_p_ar = true;
buf_check_timestamp(curbuf);
curbuf->b_p_ar = save_ar;
}
- if (buf->b_ml.ml_flags & ML_EMPTY) {
- open_buffer(false, eap, 0);
+ if (curbuf->b_ml.ml_flags & ML_EMPTY) {
+ ex_rewind(eap);
}
return;
}
diff --git a/test/functional/ex_cmds/drop_spec.lua b/test/functional/ex_cmds/drop_spec.lua
index f6e84e34a5..cfba4e93bd 100644
--- a/test/functional/ex_cmds/drop_spec.lua
+++ b/test/functional/ex_cmds/drop_spec.lua
@@ -72,7 +72,7 @@ describe(':drop', function()
lazy dogs |
{0:~ }|*6
{1:Xdrop_modified.txt [+] }|
- "Xdrop_modified.txt" [New] |
+ :drop Xdrop_modified.txt |
]])
end)
end)