diff options
Diffstat (limited to 'src/nvim/digraph.c')
-rw-r--r-- | src/nvim/digraph.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c index 9525024c1b..6ba6e659a6 100644 --- a/src/nvim/digraph.c +++ b/src/nvim/digraph.c @@ -17,7 +17,6 @@ #include "nvim/getchar.h" #include "nvim/mbyte.h" #include "nvim/message.h" -#include "nvim/misc2.h" #include "nvim/memory.h" #include "nvim/garray.h" #include "nvim/normal.h" @@ -1691,8 +1690,11 @@ static void printdigraph(digr_T *dp) msg_putchar('\n'); } - if (msg_col) { - while (msg_col % list_width != 0) { + + // Make msg_col a multiple of list_width by using spaces. + if (msg_col % list_width != 0) { + int spaces = (msg_col / list_width + 1) * list_width - msg_col; + while (spaces--) { msg_putchar(' '); } } @@ -1757,12 +1759,12 @@ char_u* keymap_init(void) vim_snprintf(buf, buflen, "keymap/%s_%s.vim", curbuf->b_p_keymap, p_enc); - if (source_runtime((char_u *)buf, FALSE) == FAIL) { + if (source_runtime((char_u *)buf, 0) == FAIL) { // try finding "keymap/'keymap'.vim" in 'runtimepath' vim_snprintf(buf, buflen, "keymap/%s.vim", curbuf->b_p_keymap); - if (source_runtime((char_u *)buf, FALSE) == FAIL) { + if (source_runtime((char_u *)buf, 0) == FAIL) { xfree(buf); return (char_u *)N_("E544: Keymap file not found"); } |