aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-15 18:18:02 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-15 19:35:31 +0200
commit8b099812eab7ccad9ebc6906450b637044de9369 (patch)
treef923d9eb0eeb241603c27c48c77ca04af55dff94 /src
parentf20bb983cab168bd9fe4f4ad560a64aeb4b19f07 (diff)
Respect terminal width printing error messages
Diffstat (limited to 'src')
-rw-r--r--src/libutil/error.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc
index da11d1ffd..0fad9ae42 100644
--- a/src/libutil/error.cc
+++ b/src/libutil/error.cc
@@ -105,7 +105,7 @@ void printCodeLines(std::ostream &out, const string &prefix, const NixCode &nixC
std::ostream& operator<<(std::ostream &out, const ErrorInfo &einfo)
{
- size_t errwidth = 80;
+ auto errwidth = std::max<size_t>(getWindowSize().second, 20);
string prefix = "";
string levelString;