mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.0.1738: ":args" output is hard to read
Problem: ":args" output is hard to read. Solution: Make columns with the names if the output is more than one line.
This commit is contained in:
@@ -2751,17 +2751,18 @@ ex_args(exarg_T *eap)
|
||||
*/
|
||||
if (ARGCOUNT > 0)
|
||||
{
|
||||
/* Overwrite the command, for a short list there is no scrolling
|
||||
* required and no wait_return(). */
|
||||
gotocmdline(TRUE);
|
||||
for (i = 0; i < ARGCOUNT; ++i)
|
||||
char **items = (char **)alloc(sizeof(char *) * ARGCOUNT);
|
||||
|
||||
if (items != NULL)
|
||||
{
|
||||
if (i == curwin->w_arg_idx)
|
||||
msg_putchar('[');
|
||||
msg_outtrans(alist_name(&ARGLIST[i]));
|
||||
if (i == curwin->w_arg_idx)
|
||||
msg_putchar(']');
|
||||
msg_putchar(' ');
|
||||
/* Overwrite the command, for a short list there is no
|
||||
* scrolling required and no wait_return(). */
|
||||
gotocmdline(TRUE);
|
||||
|
||||
for (i = 0; i < ARGCOUNT; ++i)
|
||||
items[i] = (char *)alist_name(&ARGLIST[i]);
|
||||
list_in_columns(items, ARGCOUNT, curwin->w_arg_idx);
|
||||
vim_free(items);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user