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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c
index aad145b3e5..4512b97967 100644
--- a/src/nvim/digraph.c
+++ b/src/nvim/digraph.c
@@ -1691,8 +1691,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(' ');
}
}