Lint tooltips can cover range text of diagnostic #1704
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the text annotated by a diagnostic covers multiple lines (either logical lines or visual lines with
EditorView.lineWrapping) the displayed hover tooltip can cover the annotated text:Which I think is generally not what you'd want. I'd expect the tooltip to displayed below the relevant text.
sandbox link
Lint tooltips can cover text range of diagnosticto Lint tooltips can cover range text of diagnosticDoes making lint tooltips show above their target position, the way VS Code does it, sound like an acceptable solution to you?
Yes I think so. Huh interestingly VS Code shows it not above the first line but above the hovered line. Zed does show it above the first line. I think above the first line is nicer since then it doesn't cover any of the lines in the range (especially when the tooltips are shown by pressing F8, for which VS Code and Zed have their widgets). It will however need some additional logic for when the starting line is scrolled out of view.
Attached patch implements this.