diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2018-11-13 14:17:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 14:17:00 (GMT) |
commit | 16e3a45b87ee4dc32ddd8e26ca6dba942e4721da (patch) | |
tree | 4354d323ac8652a6e92b8ed9ebf7d1b8a5f1594b | |
parent | bf7107bb864d0383028202e3f4a4228c02302961 (diff) | |
parent | d81cb42a372941c4e937498c33189575f1115e2c (diff) | |
download | Ninja-16e3a45b87ee4dc32ddd8e26ca6dba942e4721da.zip Ninja-16e3a45b87ee4dc32ddd8e26ca6dba942e4721da.tar.gz Ninja-16e3a45b87ee4dc32ddd8e26ca6dba942e4721da.tar.bz2 |
Merge pull request #1491 from mathstuf/elision-off-by-n
util: don't add ellipses width when deciding if they're necessary
-rw-r--r-- | src/util.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc index 760bc23..7bfe033 100644 --- a/src/util.cc +++ b/src/util.cc @@ -573,7 +573,7 @@ double GetLoadAverage() { string ElideMiddle(const string& str, size_t width) { const int kMargin = 3; // Space for "...". string result = str; - if (result.size() + kMargin > width) { + if (result.size() > width) { size_t elide_size = (width - kMargin) / 2; result = result.substr(0, elide_size) + "..." |