summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-02-26 15:27:23 +0100
committerBram Moolenaar <Bram@vim.org>2013-02-26 15:27:23 +0100
commitf13f45d59b1a6ab6681ee3953501f319e6d0128b (patch)
tree1e7dbd312e4f6a6fad01cff86a567e91cb55d2dc /src
parent693e40c2cdb65f19febde5664633ac465931cc63 (diff)
downloadvim-git-f13f45d59b1a6ab6681ee3953501f319e6d0128b.tar.gz
updated for version 7.3.837v7.3.837
Problem: Empty lines in :version output when 'columns' is 320. Solution: Simplify the logic of making columns. (Nazri Ramliy, Roland Eggner)
Diffstat (limited to 'src')
-rw-r--r--src/version.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/version.c b/src/version.c
index c6412bd4e..6e42c6673 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 837,
+/**/
836,
/**/
835,
@@ -2496,14 +2498,12 @@ list_features()
return;
}
- 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)
- ncol++;
-
+ ncol = (int) (Columns + 1) / width;
nrow = nfeat / ncol + (nfeat % ncol ? 1 : 0);
+ /* 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;
@@ -2525,7 +2525,10 @@ list_features()
}
}
else
- msg_putchar('\n');
+ {
+ if (msg_col > 0)
+ msg_putchar('\n');
+ }
}
}