The offending code is
https://github.com/vim/vim/blob/cf4d9625c6eb21107e030dc879c1390596fbdb8d/src/version.c#L4661
In particular, command_line_scan() knows to initialize Columns when producing a --version report, and list_features() used to look at Columns. As of the referenced commit, it instead looks at the uninitialized cmdline_width (0 on my machine). Instead of a tabularized report of features, we get a single column listing.
I can think of a few possible fixes:
Columns in list_features()cmdline_width in command_line_scan()One thing I can't figure out is why the original patch seems to blindly change Columns to cmdline_width everywhere; it's not explained in the commit message or PR, which are nominally about the tabpanel. Anyway, it's clear we can't substitute one for the other in all cases.
cc @h-east
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
The following patch helps, but doesn't restore the behavior I know from 9.1.1775:
diff --git i/src/version.c w/src/version.c index e18b2c8c3..a499f4a0d 100644 --- i/src/version.c +++ w/src/version.c @@ -5117,7 +5117,7 @@ list_in_columns(char_u **items, int size, int current) } width += 1; - if (cmdline_width < width) + if (Columns < width) { // Not enough screen columns - show one per line for (i = 0; i < item_count; ++i) @@ -5131,7 +5131,7 @@ list_in_columns(char_u **items, int size, int current) // The rightmost column doesn't need a separator. // Sacrifice it to fit in one more column if possible. - ncol = (cmdline_width + 1) / width; + ncol = (Columns + 1) / width; nrow = item_count / ncol + ((item_count % ncol) ? 1 : 0); // "i" counts columns then rows. "idx" counts rows then columns.
In particular, on that older version, I get 4 columns. With this patch I only get 3.
One thing I can't figure out is why the original patch seems to blindly change Columns to cmdline_width
I suppose I understand now that in the context of the tabpanel, you'd need the version listing to fit inside the shrunken command line space. So perhaps this patch is better, but it's still 3 columns instead of 4.
diff --git i/src/main.c w/src/main.c index 5ae94e43e..27cfdb0ed 100644 --- i/src/main.c +++ w/src/main.c @@ -2182,6 +2182,7 @@ command_line_scan(mparm_T *parmp) else if (STRICMP(argv[0] + argv_idx, "version") == 0) { Columns = 80; // need to init Columns + cmdline_width = 80; info_message = TRUE; // use mch_msg(), not mch_errmsg() # if defined(FEAT_GUI) && !defined(ALWAYS_USE_GUI) && !defined(VIMDLL) gui.starting = FALSE; // not starting GUI, will exit
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Ah, the 4 columns to 3 columns is due to 368710a (patch 9.1.1784: Wayland code can be improved, 2025-09-22), which is unrelated; it bumps with width up from 19 to 21, so we only fit 3 columns instead.
I'd probably go with the 2nd patch as a simple bugfix then cc @chrisbra
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I wrote a patch with test. I'll submit a PR.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@benknoble Thanks for reporting and investigating.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks! Adding a test is a nice touch.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()