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

Remove trailing whitespace from `lsp-describe-thing-at-point' #4576

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wavexx
Copy link

@wavexx wavexx commented Oct 3, 2024

When calling `lsp-describe-thing-at-point' trailing whitespace can leak into the help buffer. Depending on the face settings, this whitespace can be visibile.

Instead of removing trailing whitespace at the end of the buffer, do so on a line-by-line basis.

Fixes #4572

Copy link
Member

@jcs090218 jcs090218 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sort of makes sense, but not sure if there would be any other side effects. 🤔

@wavexx
Copy link
Author

wavexx commented Oct 4, 2024

I was wondering this myself in the linked issue. As far as I can see, describe-at-point is not used elsewhere.

I'm fully open in not knowing where this trailing whitespace comes from (clangd, or some internal formatting?). For testing, if you on some whitespace-mode in lsp-help, there's some substantial but semi-random amount...

@jcs090218
Copy link
Member

jcs090218 commented Oct 14, 2024

There is a compile error:

lsp-mode.el:5410:30: Warning: the function ‘string-split’ is not known to be defined

🤔

When calling `lsp-describe-thing-at-point' trailing whitespace can leak
into the help buffer. Depending on the face settings, this whitespace
can be visibile.

Instead of removing trailing whitespace at the end of the buffer, do so
on a line-by-line basis.

Fixes emacs-lsp#4572
@wavexx wavexx force-pushed the describe_trailing_whitespace branch from 1b1f051 to 7b71927 Compare October 14, 2024 13:33
@wavexx
Copy link
Author

wavexx commented Oct 14, 2024

Didn't realize string-split is a "new" alias for split-string... fixed.

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

Successfully merging this pull request may close these issues.

lsp-describe-thing-at-point should trim whitespace from all lines
2 participants