aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/main.c6
-rw-r--r--src/nvim/tui/tui.c2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 60390c3c60..4b96f5839d 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -685,9 +685,6 @@ void getout(int 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.
invoke_all_defer();
@@ -776,9 +773,6 @@ void getout(int exitval)
wait_return(false);
}
- // Position the cursor again, the autocommands may have moved it
- ui_cursor_goto(Rows - 1, 0);
-
// Apply 'titleold'.
if (p_title && *p_titleold != NUL) {
ui_call_set_title(cstr_as_string(p_titleold));
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 2f4ff13bde..975ad375a0 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -437,6 +437,8 @@ static void tui_terminal_stop(TUIData *tui)
}
tinput_stop(&tui->input);
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);
}