mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 07:41:27 +00:00
refactor(ui): devirtualize the ui layer
- The defined interface for the UI is only the RPC protocol. The original
UI interface as an array of function pointers fill no function.
- On the server, all the UI:s are all RPC channels.
- ui.c is only used on the server.
- The compositor is a preprocessing step for single-grid UI:s
- on the client, ui_client and tui talk directly to each other
- we still do module separation, as ui_client.c could form the basis
of a libnvim client module later.
Items for later PR:s
- vim.ui_attach is still an unhappy child, reconsider based on plugin experience.
- the flags in ui_events.in.h are still a mess. Can be simplified now.
- UX for remote attachment needs more work.
- startup for client can be simplified further (think of the millisecs we can save)
This commit is contained in:
@@ -627,11 +627,13 @@ void os_exit(int r)
|
||||
{
|
||||
exiting = true;
|
||||
|
||||
if (!ui_client_channel_id) {
|
||||
if (ui_client_channel_id) {
|
||||
ui_client_stop();
|
||||
} else {
|
||||
ui_flush();
|
||||
ui_call_stop();
|
||||
ml_close_all(true); // remove all memfiles
|
||||
}
|
||||
ui_call_stop();
|
||||
ml_close_all(true); // remove all memfiles
|
||||
|
||||
if (!event_teardown() && r == 0) {
|
||||
r = 1; // Exit with error if main_loop did not teardown gracefully.
|
||||
|
||||
Reference in New Issue
Block a user