68418Re: Patch 7.3.826
- Feb 22, 2013On Fri, Feb 22, 2013 at 10:00 PM, Roland Eggner
> On 2013-02-20 Wednesday at 16:48 +0100 Bram Moolenaar wrote:Maybe it's better if we limit the feature list to 80 column width?
> On wide terminals the feature list in :version message is interrupted by empty
> lines, observed with e.g. COLUMNS=320. Bugfix attached.
It's easier to scan
vertically compared to horizontally when inspecting the features available.
So something like this:
% hg diff version.c
diff -r 8b86b69546a9 src/version.c
--- a/src/version.c Wed Feb 20 21:26:00 2013 +0100
+++ b/src/version.c Fri Feb 22 23:12:51 2013 +0800
@@ -2461,6 +2461,7 @@
int nfeat = 0;
int width = 0;
+ int columns = Columns > 80 ? 80 : Columns;
/* Find the length of the longest feature name, use that + 1 as the column
* width */
@@ -2474,7 +2475,7 @@
width += 1;
- if (Columns < width)
+ if (columns < width)
/* Not enough screen columns - show one per line */
for (i = 0; features[i] != NULL; ++i)
@@ -2486,10 +2487,10 @@
- ncol = (int) Columns / width;
+ ncol = (int) columns / width;
/* The rightmost column doesn't need a separator.
* Sacrifice it to fit in one more column if possible. */
- if (Columns % width == width - 1)
+ if (columns % width == width - 1)
nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0);
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.
- << Previous post in topic Next post in topic >>