[Backport release-0.9] fix(tui): position cursor at bottom-left before stopping

This commit is contained in:
zeertzjq
2023-04-28 20:53:11 +08:00
committed by GitHub
2 changed files with 2 additions and 6 deletions

View File

@@ -690,9 +690,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);
// Optionally print hashtable efficiency. // Optionally print hashtable efficiency.
hash_debug_results(); hash_debug_results();
@@ -778,9 +775,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);
} }