diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-03 03:52:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-03 03:52:38 +0000 |
commit | 44cf08ecf648210347191942b1664e36d46290c5 (patch) | |
tree | d7d418e449ac56965682793b51cc98e608e453c4 /lib/Frontend/TextDiagnosticPrinter.cpp | |
parent | ad04e6737e3267a502970acac8abb54b0c899db6 (diff) |
Respect the COLUMNS environment variable for word-wrapping (so we get
word-wrapping by default in Emacs; yay!). Thanks, Daniel.
Use LLVM's System layer rather than calling isatty() directly.
Fix a thinko in printing the indentation string that was causing some
weird output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnosticPrinter.cpp')
-rw-r--r-- | lib/Frontend/TextDiagnosticPrinter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp index 017ead43e4..b8c10b536b 100644 --- a/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/lib/Frontend/TextDiagnosticPrinter.cpp @@ -570,7 +570,8 @@ static bool PrintWordWrapped(llvm::raw_ostream &OS, // This word does not fit on the current line, so wrap to the next // line. - OS << '\n' << IndentStr.begin(); + OS << '\n'; + OS.write(&IndentStr[0], Indentation); OS.write(&Str[WordStart], WordLength); Column = Indentation + WordLength; Wrapped = true; |