aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 64722ef35d..de6535dc78 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -1928,7 +1928,7 @@ static int vgetorpeek(int advance)
set_option_value("paste", !p_paste, NULL, 0);
if (!(State & INSERT)) {
msg_col = 0;
- msg_row = (int)Rows - 1;
+ msg_row = Rows - 1;
msg_clr_eos(); // clear ruler
}
status_redraw_all();
@@ -2273,14 +2273,13 @@ static int vgetorpeek(int advance)
curwin->w_wrow = old_wrow;
}
- /* this looks nice when typing a dead character map */
- if ((State & CMDLINE)
- && cmdline_star == 0
- && ptr2cells(typebuf.tb_buf + typebuf.tb_off
- + typebuf.tb_len - 1) == 1) {
- putcmdline(typebuf.tb_buf[typebuf.tb_off
- + typebuf.tb_len - 1], FALSE);
- c1 = 1;
+ // this looks nice when typing a dead character map
+ if ((State & CMDLINE) && cmdline_star == 0) {
+ char_u *p = typebuf.tb_buf + typebuf.tb_off + typebuf.tb_len - 1;
+ if (ptr2cells(p) == 1 && *p < 128) {
+ putcmdline((char)(*p), false);
+ c1 = 1;
+ }
}
}