diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-24 16:29:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 16:29:07 +0800 |
commit | 9637b7dae417f336ca72cfcb201cb37247d794a8 (patch) | |
tree | 62f810d4e4d16e77a41e5cd38de2f1e46ab66d72 /src | |
parent | ac1c23442fd2688f89d75310b8c769e91d81e715 (diff) | |
download | rneovim-9637b7dae417f336ca72cfcb201cb37247d794a8.tar.gz rneovim-9637b7dae417f336ca72cfcb201cb37247d794a8.tar.bz2 rneovim-9637b7dae417f336ca72cfcb201cb37247d794a8.zip |
fix(startup): stop TUI properly when quitting at swap dialog (#25337)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 0bb69d000b..4b3244de12 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -341,7 +341,7 @@ int main(int argc, char **argv) uint64_t rv = ui_client_start_server(params.argc, params.argv); if (!rv) { os_errmsg("Failed to start Nvim server!\n"); - getout(1); + os_exit(1); } ui_client_channel_id = rv; } @@ -1582,6 +1582,7 @@ static void handle_tag(char *tagname) // If the user doesn't want to edit the file then we quit here. if (swap_exists_did_quit) { + ui_call_error_exit(1); getout(1); } } @@ -1725,6 +1726,7 @@ static void create_windows(mparm_T *parmp) if (got_int || only_one_window()) { // abort selected or quit and only one window did_emsg = false; // avoid hit-enter prompt + ui_call_error_exit(1); getout(1); } // We can't close the window, it would disturb what @@ -1828,6 +1830,7 @@ static void edit_buffers(mparm_T *parmp, char *cwd) if (got_int || only_one_window()) { // abort selected and only one window did_emsg = false; // avoid hit-enter prompt + ui_call_error_exit(1); getout(1); } win_close(curwin, true, false); @@ -2238,6 +2241,7 @@ static void usage(void) static void check_swap_exists_action(void) { if (swap_exists_action == SEA_QUIT) { + ui_call_error_exit(1); getout(1); } handle_swap_exists(NULL); |