Closed sorawee closed 2 years ago
Thanks for the report.
It defaults to showing after the end of the span reported by check-syntax, because that avoids hiding the object of the tooltip.
If the end of the span is off-window, as in your report, I could use the beginning of the span -- but both could be off-window, for a very wide span (e.g. if your example test
form spanned several window heights).
So maybe the least-worst simple mitigation would be, when the end of the span is off-screen, just show it after point (where the text cursor is)? As you move around within that very long span, the tooltip will follow your cursor around, which maybe isn't ideal but probably isn't terrible.
I merged a commit for this. A slight difference from what I described above: When both the beginning and end of the span are off-window, the tooltip is shown at the top of the window. I found this less annoying than it being drawn at point and moving around as you move point.
Consider the following file (new lines here are to flush
foo
to be out of the viewable area):Moving the caret over
test
doesn't show the syntax error tooltip. I need to either zoom out or move down until I seefoo
to be able to see the tooltip.