aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/terminal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 8c08e98b5c..cec7fc84a5 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -240,6 +240,8 @@ Terminal *terminal_open(TerminalOptions opts)
set_option_value((uint8_t *)"relativenumber", false, NULL, OPT_LOCAL);
buf_set_term_title(curbuf, (char *)curbuf->b_ffname);
RESET_BINDING(curwin);
+ // Reset cursor in current window.
+ curwin->w_cursor = (pos_T){ .lnum = 1, .col = 0, .coladd = 0 };
// Apply TermOpen autocmds _before_ configuring the scrollback buffer.
apply_autocmds(EVENT_TERMOPEN, NULL, NULL, false, curbuf);