mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
vim-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.5d69da462f
vim-patch:8.0.1740: warning for signed-unsigned incompatibility Problem: Warning for signed-unsigned incompatibility. Solution: Change type from "char *" to "char_u *". (John Marriott)405dadb63e
Removes ported legacy test that was re-added later. Ref: https://github.com/neovim/neovim/pull/10147#issuecomment-512609513
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "nvim/screen.h"
|
||||
#include "nvim/strings.h"
|
||||
#include "nvim/undo.h"
|
||||
#include "nvim/version.h"
|
||||
#include "nvim/window.h"
|
||||
#include "nvim/profile.h"
|
||||
#include "nvim/os/os.h"
|
||||
@@ -1791,18 +1792,17 @@ void ex_args(exarg_T *eap)
|
||||
} else if (eap->cmdidx == CMD_args) {
|
||||
// ":args": list arguments.
|
||||
if (ARGCOUNT > 0) {
|
||||
// Overwrite the command, for a short list there is no scrolling
|
||||
// required and no wait_return().
|
||||
gotocmdline(true);
|
||||
for (int i = 0; i < ARGCOUNT; i++) {
|
||||
if (i == curwin->w_arg_idx) {
|
||||
msg_putchar('[');
|
||||
char_u **items = xmalloc(sizeof(char_u *) * (size_t)ARGCOUNT);
|
||||
|
||||
if (items != NULL) {
|
||||
// Overwrite the command, for a short list there is no scrolling
|
||||
// required and no wait_return().
|
||||
gotocmdline(true);
|
||||
for (int i = 0; i < ARGCOUNT; i++) {
|
||||
items[i] = alist_name(&ARGLIST[i]);
|
||||
}
|
||||
msg_outtrans(alist_name(&ARGLIST[i]));
|
||||
if (i == curwin->w_arg_idx) {
|
||||
msg_putchar(']');
|
||||
}
|
||||
msg_putchar(' ');
|
||||
list_in_columns(items, ARGCOUNT, curwin->w_arg_idx);
|
||||
xfree(items);
|
||||
}
|
||||
}
|
||||
} else if (eap->cmdidx == CMD_arglocal) {
|
||||
|
Reference in New Issue
Block a user