mirror of
https://github.com/neovim/neovim.git
synced 2025-10-06 01:46:29 +00:00
fix(tui): make :cquit work properly with remote TUI (#25313)
This commit is contained in:
@@ -659,6 +659,9 @@ void os_exit(int r)
|
||||
|
||||
if (ui_client_channel_id) {
|
||||
ui_client_stop();
|
||||
if (r == 0) {
|
||||
r = ui_client_exit_status;
|
||||
}
|
||||
} else {
|
||||
ui_flush();
|
||||
ui_call_stop();
|
||||
|
@@ -386,6 +386,9 @@ static void terminfo_stop(TUIData *tui)
|
||||
unibi_out_ext(tui, tui->unibi_ext.disable_extended_keys);
|
||||
// May restore old title before exiting alternate screen.
|
||||
tui_set_title(tui, (String)STRING_INIT);
|
||||
if (ui_client_exit_status == 0) {
|
||||
ui_client_exit_status = tui->seen_error_exit;
|
||||
}
|
||||
// if nvim exited with nonzero status, without indicated this was an
|
||||
// intentional exit (like `:1cquit`), it likely was an internal failure.
|
||||
// Don't clobber the stderr error message in this case.
|
||||
|
Reference in New Issue
Block a user