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

Hover popup shows horizontal line #1987

Closed
rchl opened this issue Jul 5, 2022 · 3 comments · Fixed by #1989
Closed

Hover popup shows horizontal line #1987

rchl opened this issue Jul 5, 2022 · 3 comments · Fixed by #1989
Labels

Comments

@rchl
Copy link
Member

rchl commented Jul 5, 2022

Describe the bug
Don't have time to look at it now but LSP-json shows some unexpected content (line) at the bottom of the hover popup:
Screenshot 2022-07-05 at 11 07 11

Latest everything at the time of reporting.

@predragnikolic
Copy link
Member

Setting "show_symbol_action_links" to false will fix the issue.
This was introduced in #1974

Didn't looked closely at that PR to see what exactly causes this :)

@predragnikolic
Copy link
Member

I looked closely and the bug is somewhere here around this line
https://github.com/sublimelsp/LSP/pull/1974/files#diff-e572bef24745eb3ac503d83266340c8f98d60cf6e2d1ae91b0628370af45ac58R280

        if userprefs().show_symbol_action_links and contents and not only_diagnostics and hover_content:
            symbol_actions_content = self.symbol_actions_content(listener, point)
            if link_content and link_has_standard_tooltip:
                symbol_actions_content += ' | ' + link_content
            elif link_content:
                contents += '<div class="link with-padding">' + link_content + '</div>'
            contents += '<div class="actions">' + symbol_actions_content + '</div>' # hot spot, line 280 :)

symbol_actions_content value is an empty string on line 280

@jwortmann
Copy link
Member

Looks like putting the last line under a if symbol_actions_content: will fix it.

And I think there is another bug: in case there is non-empty link_content, but no other symbol_action_content, then there will be an unneeded vertical spacer | at the beginning. I can make a PR to fix it.

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

Successfully merging a pull request may close this issue.

3 participants