mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
vim-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.
725310d89e
This commit is contained in:
@@ -1521,7 +1521,8 @@ void msg_make(char_u *arg)
|
||||
/// the character/string -- webb
|
||||
int msg_outtrans_special(
|
||||
const char_u *strstart,
|
||||
int from ///< true for LHS of a mapping
|
||||
bool from, ///< true for LHS of a mapping
|
||||
int maxlen ///< screen columns, 0 for unlimeted
|
||||
)
|
||||
{
|
||||
if (strstart == NULL) {
|
||||
@@ -1541,6 +1542,9 @@ int msg_outtrans_special(
|
||||
string = str2special((const char **)&str, from, false);
|
||||
}
|
||||
const int len = vim_strsize((char_u *)string);
|
||||
if (maxlen > 0 && retval + len >= maxlen) {
|
||||
break;
|
||||
}
|
||||
// Highlight special keys
|
||||
msg_puts_attr(string, (len > 1
|
||||
&& (*mb_ptr2len)((char_u *)string) <= 1
|
||||
|
Reference in New Issue
Block a user