Mercurial > vim
diff src/ex_cmds.c @ 34190:4f8b57f8b07a v9.1.0046
patch 9.1.0046: :drop does not re-use empty buffer
Commit: https://github.com/vim/vim/commit/f96dc8d07f752ddd96d1447d85278a85255a1462
Author: Rocco Mao <dapeng.mao@qq.com>
Date: Tue Jan 23 21:27:19 2024 +0100
patch 9.1.0046: :drop does not re-use empty buffer
Problem: :drop does not re-use empty buffer
(Rocco Mao)
Solution: Make :drop re-use an empty buffer
(Rocco Mao)
fixes: #13851
closes: #13881
Signed-off-by: Rocco Mao <dapeng.mao@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 23 Jan 2024 21:30:05 +0100 |
parents | 1629cc65d78d |
children | a522c6c0127b |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5425,8 +5425,7 @@ ex_smile(exarg_T *eap UNUSED) /* * ":drop" - * Opens the first argument in a window. When there are two or more arguments - * the argument list is redefined. + * Opens the first argument in a window, and the argument list is redefined. */ void ex_drop(exarg_T *eap) @@ -5463,6 +5462,8 @@ ex_drop(exarg_T *eap) // edited in a window yet. It's like ":tab all" but without closing // windows or tabs. ex_all(eap); + cmdmod.cmod_tab = 0; + ex_rewind(eap); return; } @@ -5486,6 +5487,7 @@ ex_drop(exarg_T *eap) buf_check_timestamp(curbuf, FALSE); curbuf->b_p_ar = save_ar; } + ex_rewind(eap); return; } }