mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
fix(terminal): assign channel to terminal earlier (#25771)
This commit is contained in:
@@ -1034,9 +1034,12 @@ Integer nvim_open_term(Buffer buffer, DictionaryOf(LuaRef) opts, Error *err)
|
||||
topts.write_cb = term_write;
|
||||
topts.resize_cb = term_resize;
|
||||
topts.close_cb = term_close;
|
||||
Terminal *term = terminal_open(buf, topts);
|
||||
terminal_check_size(term);
|
||||
chan->term = term;
|
||||
channel_incref(chan);
|
||||
terminal_open(&chan->term, buf, topts);
|
||||
if (chan->term != NULL) {
|
||||
terminal_check_size(chan->term);
|
||||
}
|
||||
channel_decref(chan);
|
||||
return (Integer)chan->id;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user