aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-03 23:13:32 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-03 23:18:16 -0400
commit5f41ca4013d17a81fcfd0a7b0be0422cb9cc25ec (patch)
tree74043612f63c396926dd6f2585c5b16c890244b7 /src/nvim/screen.c
parent233a173226112adc9b8fed336fa03c3b32c3675f (diff)
downloadrneovim-5f41ca4013d17a81fcfd0a7b0be0422cb9cc25ec.tar.gz
rneovim-5f41ca4013d17a81fcfd0a7b0be0422cb9cc25ec.tar.bz2
rneovim-5f41ca4013d17a81fcfd0a7b0be0422cb9cc25ec.zip
vim-patch:8.1.0002: :stopinsert changes the message position
Problem: :stopinsert changes the message position. Solution: Save and restore msg_col and msg_row in clearmode(). (Jason Franklin) https://github.com/vim/vim/commit/2abad54cede7c33f090fbde19a9a3eb3dbf78e53
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 9439869b32..84c3f169ef 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -6595,6 +6595,9 @@ void unshowmode(bool force)
// Clear the mode message.
void clearmode(void)
{
+ const int save_msg_row = msg_row;
+ const int save_msg_col = msg_col;
+
msg_ext_ui_flush();
msg_pos_mode();
if (reg_recording != 0) {
@@ -6602,6 +6605,9 @@ void clearmode(void)
}
msg_clr_eos();
msg_ext_flush_showmode();
+
+ msg_col = save_msg_col;
+ msg_row = save_msg_row;
}
static void recording_mode(int attr)