diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-21 10:18:37 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-09-21 10:18:37 +0200 |
commit | 911f3d962358bb032b55e9984d0b25ffc522ff49 (patch) | |
tree | a21802a601c1aa4953030d5e24a2ed04b95ab37b /src/nvim/ui_client.h | |
parent | f246cf029fb4e7a07788adfa19f91608db7bd816 (diff) | |
download | rneovim-911f3d962358bb032b55e9984d0b25ffc522ff49.tar.gz rneovim-911f3d962358bb032b55e9984d0b25ffc522ff49.tar.bz2 rneovim-911f3d962358bb032b55e9984d0b25ffc522ff49.zip |
fix(tui): don't overwrite an assertion faliure message on exit
If nvim exited with nonzero status this is for one of the two reasons
- `:cquit` was invoked. This is used by users and plugins to communicate
a result, like a nonzero status will fail a `git commit` operation
- There was an internal error or deadly signal. in this case an error
message was likely written to stderr or to the screen.
In the latter case, the error message was often hidden by the TUI
exiting altscreen mode, which erases all visible terminal text.
This change prevents this in the latter case, while still cleaning up
the terminal properly when `:cquit` was deliberatily invoked.
Other cleanup like exiting mouse mode and raw mode is still done.
Diffstat (limited to 'src/nvim/ui_client.h')
-rw-r--r-- | src/nvim/ui_client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/ui_client.h b/src/nvim/ui_client.h index 7e5f847039..05964422f3 100644 --- a/src/nvim/ui_client.h +++ b/src/nvim/ui_client.h @@ -23,6 +23,9 @@ EXTERN sattr_T *grid_line_buf_attr INIT(= NULL); // ID of the ui client channel. If zero, the client is not running. EXTERN uint64_t ui_client_channel_id INIT(= 0); +// exit status from embedded nvim process +EXTERN int ui_client_exit_status INIT(= 0); + // TODO(bfredl): the current structure for how tui and ui_client.c communicate is a bit awkward. // This will be restructured as part of The UI Devirtualization Project. |