aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/digraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/digraph.c')
-rw-r--r--src/nvim/digraph.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c
index aad145b3e5..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(' ');
}
}