Mercurial > vim
comparison src/ex_cmds.c @ 34600:3b8ed014a445 v9.1.0192
patch 9.1.0192: drop: don't rewind when editing the same file
Commit: https://github.com/vim/vim/commit/978178823b7c62a0249411f3d1f584f8a3144c5d
Author: Christian Brabandt <cb@256bit.org>
Date: Wed Mar 20 20:19:47 2024 +0100
patch 9.1.0192: drop: don't rewind when editing the same file
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 20 Mar 2024 20:30:07 +0100 |
parents | 9e093c96dff6 |
children | 497db521aa84 |
comparison
equal
deleted
inserted
replaced
34599:61e70b5183f1 | 34600:3b8ed014a445 |
---|---|
5501 // reload the file if it is newer | 5501 // reload the file if it is newer |
5502 curbuf->b_p_ar = TRUE; | 5502 curbuf->b_p_ar = TRUE; |
5503 buf_check_timestamp(curbuf, FALSE); | 5503 buf_check_timestamp(curbuf, FALSE); |
5504 curbuf->b_p_ar = save_ar; | 5504 curbuf->b_p_ar = save_ar; |
5505 } | 5505 } |
5506 ex_rewind(eap); | 5506 if (buf->b_ml.ml_flags & ML_EMPTY) |
5507 open_buffer(FALSE, eap, 0); | |
5507 return; | 5508 return; |
5508 } | 5509 } |
5509 } | 5510 } |
5510 | 5511 |
5511 /* | 5512 /* |