diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-13 03:48:56 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-13 03:48:56 +0000 |
commit | 1032f093ccd7d67553737d7a7686973291730d0e () | |
tree | 251c6d90e20b4f6132bae8b362a0565c6d445fd8 /eval_error.c | |
parent | b07e4af86935780887944432542f0d4b8a2ab62f (diff) |
eval_error.c: reset attributes
* eval_error.c (print_errinfo): reset all attributes for each lines before newlines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | eval_error.c | 32 |
1 files changed, 25 insertions, 7 deletions
@@ -152,14 +152,32 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA if (highlight) write_warn(str, reset); write_warn2(str, "\n", 1); } - if (tail) { - int eol = einfo[elen-1] == '\n'; - if (eol && highlight) --elen; - if (tail < einfo+elen) { - if (highlight) write_warn(str, bold); write_warn2(str, tail, einfo+elen-tail); - if (highlight) write_warn(str, reset); - if (highlight || !eol) write_warn2(str, "\n", 1); } } else if (!epath) { |