This change introduced a bug. Start executing the following (after starting "vim --clean"):
:let width = &columns / 3 - 4
:let farg = repeat('f', width)
:let garg = repeat('g', width)
:exe 'args a b c d e' farg garg
:args
The arguments will be printed on 2 lines with the 2nd line too long so it'll be wrapped:
[a] d gggggggggggggggggggggg
b e c fffffffffff
fffffffffff
The proper way to display the args (the way previous vim versions did) is to print them on 3 lines:
[a] d gggggggggggggggggggggg
b e
c ffffffffffffffffffffff
The problem lies in this part:
> - else
> - {
> - if (msg_col > 0)
> - msg_putchar('\n');
> - }
> }
> }
I suppose this was axed to avoid sending a '\n' at the end of the last line. But it skips '\n' even for the second to last line - after printing args "b" and "e". Or even more often. (In fact any time when idx >= item_count.) So I suggest introducing the "else" branch back, like in the following patch:
@@ -4438,6 +4438,12 @@ list_in_columns(char_u **items, int size, int current)
msg_putchar(' ');
}
}
+ else
+ {
+ if (msg_col > 0 && cur_row < nrow)
+ msg_putchar('\n');
+ ++cur_row;
+ }
}
}
This issue is related to other 2 topics - to the ones which toothpik mentioned with subjects "version display horked" and "script stopped working". In the latter, he mentioned:
> i still maintain the --version output is horked
After the fix, the number of columns with features will be uniform once again. It might even help to get rid of the hang. Though I am not sure I run vim in the same way as toothpik as this is depends on &columns.
Tom M