[vim/vim] tab drop triggers BufUnload (Issue #18893)

7 views
Skip to first unread message

Toby She

unread,
Dec 8, 2025, 9:46:24 PMDec 8
to vim/vim, Subscribed
otomn created an issue (vim/vim#18893)

Steps to reproduce

:set shortmess+=F
:au BufUnload * echo "BufUnload " . expand("%")
:e test
:tab drop test

Expected behaviour

"BufUnload test" is printed but it should not be printed.

Version of Vim

9.0

Environment

Mac, WSL

Logs and stack traces


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18893@github.com>

zeertzjq

unread,
Dec 8, 2025, 9:49:31 PMDec 8
to vim/vim, Subscribed
zeertzjq left a comment (vim/vim#18893)

This seems to be a regression from patch 9.1.0046.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18893/3629974131@github.com>

Toby She

unread,
Dec 8, 2025, 9:53:40 PMDec 8
to vim/vim, Subscribed
otomn left a comment (vim/vim#18893)

Note: tab drop does not trigger BufUnload on 9.0. But, e does trigger BufUnload on 9.0.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18893/3629982275@github.com>

Christian Brabandt

unread,
Dec 28, 2025, 10:29:18 AM (yesterday) Dec 28
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18893)

Also, this still happens for :drop if test is an empty file, but doesn't happen if test is non-empty.

That is because of 9781788

I am not sure what the correct behaviour should be. If we comment out part of the patch that triggers ex_rewind, it won't trigger the BufUnload anymore, but the file would also not be loaded. So I think it should go through do_ecmd() (which will then trigger the BufUnload again).


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18893/3694827025@github.com>

Reply all
Reply to author
Forward
0 new messages