patch 8.1.1201: output of :command is hard to read
Problem: Output of :command is hard to read.
Solution: Make some columns wider, some narrower. Truncate the command when
listing all.
diff --git a/src/message.c b/src/message.c
index fa37df1..e18f952 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1594,7 +1594,8 @@
int
msg_outtrans_special(
char_u *strstart,
- int from) /* TRUE for lhs of a mapping */
+ int from, // TRUE for lhs of a mapping
+ int maxlen) // screen columns, 0 for unlimeted
{
char_u *str = strstart;
int retval = 0;
@@ -1614,6 +1615,8 @@
else
text = (char *)str2special(&str, from);
len = vim_strsize((char_u *)text);
+ if (maxlen > 0 && retval + len >= maxlen)
+ break;
/* Highlight special keys */
msg_puts_attr(text, len > 1
&& (*mb_ptr2len)((char_u *)text) <= 1 ? attr : 0);