Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for TERM=norepeat when displaying errors #1979

Merged
merged 1 commit into from Aug 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changes
Expand Up @@ -164,6 +164,9 @@ Working version
- GPR#1976: Better error messages for extension constructor type mismatches
(Thomas Refis, review by Gabriel Scherer)

* GPR#1979: Remove support for TERM=norepeat when displaying errors
(Armaël Guéneau, review by Gabriel Scherer and Florian Angeletti)

### Code generation and optimizations:

- MPR#7725, GPR#1754: improve AFL instrumentation for objects and lazy values.
Expand Down
11 changes: 4 additions & 7 deletions parsing/location.ml
Expand Up @@ -515,15 +515,12 @@ let terminfo_toplevel_printer (lb: lexbuf): report_printer =

let best_toplevel_printer () =
setup_terminal ();
let norepeat =
try Sys.getenv "TERM" = "norepeat" with Not_found -> false
in
match !status, !input_lexbuf, norepeat with
| Terminfo.Good_term, Some lb, _ ->
match !status, !input_lexbuf with
| Terminfo.Good_term, Some lb ->
terminfo_toplevel_printer lb
| Terminfo.Bad_term, Some lb, false ->
| Terminfo.Bad_term, Some lb ->
dumb_toplevel_printer lb
| _, _, _ ->
| _, _ ->
batch_mode_printer

(* Creates a printer for the current input *)
Expand Down