diff options
author | Christian Brabandt <cb@256bit.org> | 2024-03-20 20:19:47 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-03-20 20:20:39 +0100 |
commit | 978178823b7c62a0249411f3d1f584f8a3144c5d (patch) | |
tree | f7d0b3b53d643f638b410f01bca93fbba311e206 /src/ex_cmds.c | |
parent | 2680a074d4790abb372ecda658b0c455a6fe06cf (diff) |
patch 9.1.0192: drop: don't rewind when editing the same filev9.1.0192
Problem: :drop tries to :rewind the argumentlist, which results in E37
(after v9.1.0046)
Solution: instead of calling ex_rewind(), call open_buffer() only when
re-using the initial empty buffer
fixes: #14219
closes: #14220
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index d0fc928e65..2527476a25 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5503,7 +5503,8 @@ ex_drop(exarg_T *eap) buf_check_timestamp(curbuf, FALSE); curbuf->b_p_ar = save_ar; } - ex_rewind(eap); + if (buf->b_ml.ml_flags & ML_EMPTY) + open_buffer(FALSE, eap, 0); return; } } |