mirror of
https://github.com/neovim/neovim.git
synced 2026-04-25 08:44:06 +00:00
fix(terminal): losing output if BufFile* poll for events (#37580)
Problem: Terminal loses output if a BufFilePre or BufFilePost autocmd
polls for events.
Solution: Rename the buffer after allocating the terminal instance. Also
fix buffer getting wrong name if BufFilePre uses NameBuff.
This commit is contained in:
@@ -1155,7 +1155,8 @@ Integer nvim_open_term(Buffer buffer, Dict(open_term) *opts, Error *err)
|
||||
}
|
||||
|
||||
channel_incref(chan);
|
||||
terminal_open(&chan->term, buf, topts);
|
||||
chan->term = terminal_alloc(buf, topts);
|
||||
terminal_open(&chan->term, buf);
|
||||
if (chan->term != NULL) {
|
||||
terminal_check_size(chan->term);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user