call assert_equal(['d', 'c', 'b', 'a', 'c'], g:buffers)
- redir => result
- args
- redir END
- call assert_equal('a b [c] d', trim(result))
+ call assert_equal("\na b [c] d ", execute(':args'))
.argd
call assert_equal(['a', 'b', 'd'], argv())
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1737,
/**/
1736,
/**/
int i;
int ncol;
int nrow;
+ int cur_row = 1;
int item_count = 0;
int width = 0;
#ifdef FEAT_SYN_HL
return;
}
- /* The rightmost column doesn't need a separator.
- * Sacrifice it to fit in one more column if possible. */
+ // The rightmost column doesn't need a separator.
+ // Sacrifice it to fit in one more column if possible.
ncol = (int) (Columns + 1) / width;
nrow = item_count / ncol + (item_count % ncol ? 1 : 0);
- /* i counts columns then rows. idx counts rows then columns. */
+ // "i" counts columns then rows. idx counts rows then columns.
for (i = 0; !got_int && i < nrow * ncol; ++i)
{
int idx = (i / ncol) + (i % ncol) * nrow;
msg_putchar(']');
if (last_col)
{
- if (msg_col > 0)
+ if (msg_col > 0 && cur_row < nrow)
msg_putchar('\n');
+ ++cur_row;
}
else
{
msg_putchar(' ');
}
}
- else
- {
- if (msg_col > 0)
- msg_putchar('\n');
- }
}
}