mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
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.
This commit is contained in:
@@ -167,4 +167,7 @@ void msg_history_show(Array entries)
|
||||
FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY;
|
||||
void msg_history_clear(void)
|
||||
FUNC_API_SINCE(10) FUNC_API_REMOTE_ONLY;
|
||||
|
||||
void error_exit(Integer status)
|
||||
FUNC_API_SINCE(12);
|
||||
#endif // NVIM_API_UI_EVENTS_IN_H
|
||||
|
Reference in New Issue
Block a user