diff options
Diffstat (limited to 'src/nvim/state.c')
-rw-r--r-- | src/nvim/state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/state.c b/src/nvim/state.c index d75f4038ae..bfd73050c3 100644 --- a/src/nvim/state.c +++ b/src/nvim/state.c @@ -113,7 +113,7 @@ int get_real_state(void) /// @returns[allocated] mode string char *get_mode(void) { - char *buf = xcalloc(3, sizeof(char)); + char *buf = xcalloc(4, sizeof(char)); if (VIsual_active) { if (VIsual_select) { @@ -160,6 +160,8 @@ char *get_mode(void) buf[0] = 'n'; if (finish_op) { buf[1] = 'o'; + // to be able to detect force-linewise/blockwise/characterwise operations + buf[2] = (char)motion_force; } } |