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.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index 64722ef35d..d8eeaa9d07 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -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;
+ }
}
}