Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Remove nulls from input #746

Closed
wants to merge 1 commit into from
Closed

Remove nulls from input #746

wants to merge 1 commit into from

Conversation

zenzike
Copy link
Contributor

@zenzike zenzike commented Jul 29, 2013

Fixes #317.

@lcd047
Copy link
Collaborator

lcd047 commented Jul 30, 2013

This breaks on systems that don't have tr, for example Windows.

@zenzike
Copy link
Contributor Author

zenzike commented Jul 30, 2013

Fair enough. I'll take a look at a vim only solution.

@zenzike zenzike closed this Jul 30, 2013
@lcd047
Copy link
Collaborator

lcd047 commented Jul 30, 2013

Ideally there would be a postprocess function that would do that. However, Vim truncates the lines at \0 while reading the error files. I'd speculate that's a bug in Vim, but since Vim development process is what it is, that information is probably less than useful. :)

As @eagletmt points out, readfile() is one of the few functions in Vim that does cope with \0. A possible solution would be to call system() instead of lmake, preprocess the error file, and parse errors with lgetexpr. The preprocess part might be something like applying a (list of) function(s) to each line in the error files, more or less like the existing postprocess functions. That would allow us to get rid of some helper scripts (f.i. validator_decode.awk), and make the error files more manageable before parsing them. The problem is writing a system() incantation that works the exact same way as lmake, on all systems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only the first line of multiline Haskell errors is displayed
2 participants