fix(tui): position cursor at bottom-left before stopping (#23369)

Fix #23361
This commit is contained in:
zeertzjq 2023-04-28 20:26:02 +08:00 committed by GitHub
parent 727ec8d59d
commit 4f235e3caf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -685,9 +685,6 @@ void getout(int exitval)
set_vim_var_nr(VV_EXITING, exitval); set_vim_var_nr(VV_EXITING, exitval);
// Position the cursor on the last screen line, below all the text
ui_cursor_goto(Rows - 1, 0);
// Invoked all deferred functions in the function stack. // Invoked all deferred functions in the function stack.
invoke_all_defer(); invoke_all_defer();
@ -776,9 +773,6 @@ void getout(int exitval)
wait_return(false); wait_return(false);
} }
// Position the cursor again, the autocommands may have moved it
ui_cursor_goto(Rows - 1, 0);
// Apply 'titleold'. // Apply 'titleold'.
if (p_title && *p_titleold != NUL) { if (p_title && *p_titleold != NUL) {
ui_call_set_title(cstr_as_string(p_titleold)); ui_call_set_title(cstr_as_string(p_titleold));

View File

@ -437,6 +437,8 @@ static void tui_terminal_stop(TUIData *tui)
} }
tinput_stop(&tui->input); tinput_stop(&tui->input);
signal_watcher_stop(&tui->winch_handle); signal_watcher_stop(&tui->winch_handle);
// Position the cursor on the last screen line, below all the text
cursor_goto(tui, tui->height - 1, 0);
terminfo_stop(tui); terminfo_stop(tui);
} }