Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
34189:598c8c0a779c | 34190:4f8b57f8b07a |
---|---|
5423 msg_clr_eos(); | 5423 msg_clr_eos(); |
5424 } | 5424 } |
5425 | 5425 |
5426 /* | 5426 /* |
5427 * ":drop" | 5427 * ":drop" |
5428 * Opens the first argument in a window. When there are two or more arguments | 5428 * Opens the first argument in a window, and the argument list is redefined. |
5429 * the argument list is redefined. | |
5430 */ | 5429 */ |
5431 void | 5430 void |
5432 ex_drop(exarg_T *eap) | 5431 ex_drop(exarg_T *eap) |
5433 { | 5432 { |
5434 int split = FALSE; | 5433 int split = FALSE; |
5461 { | 5460 { |
5462 // ":tab drop file ...": open a tab for each argument that isn't | 5461 // ":tab drop file ...": open a tab for each argument that isn't |
5463 // edited in a window yet. It's like ":tab all" but without closing | 5462 // edited in a window yet. It's like ":tab all" but without closing |
5464 // windows or tabs. | 5463 // windows or tabs. |
5465 ex_all(eap); | 5464 ex_all(eap); |
5465 cmdmod.cmod_tab = 0; | |
5466 ex_rewind(eap); | |
5466 return; | 5467 return; |
5467 } | 5468 } |
5468 | 5469 |
5469 // ":drop file ...": Edit the first argument. Jump to an existing | 5470 // ":drop file ...": Edit the first argument. Jump to an existing |
5470 // window if possible, edit in current window if the current buffer | 5471 // window if possible, edit in current window if the current buffer |
5484 // reload the file if it is newer | 5485 // reload the file if it is newer |
5485 curbuf->b_p_ar = TRUE; | 5486 curbuf->b_p_ar = TRUE; |
5486 buf_check_timestamp(curbuf, FALSE); | 5487 buf_check_timestamp(curbuf, FALSE); |
5487 curbuf->b_p_ar = save_ar; | 5488 curbuf->b_p_ar = save_ar; |
5488 } | 5489 } |
5490 ex_rewind(eap); | |
5489 return; | 5491 return; |
5490 } | 5492 } |
5491 } | 5493 } |
5492 | 5494 |
5493 /* | 5495 /* |