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

Mix between calls to print_* functions from Pervasives et Format #4361

Closed
vicuna opened this issue Aug 11, 2007 · 2 comments
Closed

Mix between calls to print_* functions from Pervasives et Format #4361

vicuna opened this issue Aug 11, 2007 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 11, 2007

Original bug ID: 4361
Reporter: @yakobowski
Status: closed (set by @xavierleroy on 2007-10-25T08:54:01Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 3.10+dev
Fixed in version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

The function highlight_dumb of Location.ml takes as argument a formatter, writes something on it using Format.fprintf (the characters locations for Emacs), and then writes the excerpt from the source code using calls to functions of Pervasives, thus ignoring the formatter. If that function is used any with anything else than std_formatted as the destination, the display is messed up.
Also, the function highlight_terminfo above completely ignores its formatter argument.

@vicuna
Copy link
Author

vicuna commented Oct 25, 2007

Comment author: @xavierleroy

Formatters add an additional layer of buffering. There is no other solution than to flush the formatter before outputting data using Pervasives functions.

@vicuna vicuna closed this as completed Oct 25, 2007
@vicuna
Copy link
Author

vicuna commented Nov 21, 2007

Comment author: @damiendoligez

Fixed highlight_dumb in 3.10.1+dev3.
For highlight_terminfo, I added a flush of the formatter
at the beginning of the function. We can't do more
because the Terminfo functions can't output to a formatter.

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant