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

[lsp-ui-sideline] Width calculation wrong when using left-margin-width' and right-margin-width' #31

Closed
terlar opened this issue Jan 1, 2018 · 5 comments

Comments

@terlar
Copy link

terlar commented Jan 1, 2018

If you set:

(setq left-margin-width 1
      right-margin-width 1)

It will calculate the width wrong and cause wrapping:
2018-01-01-141741_3199x363_scrot

@terlar terlar changed the title [lsp-ui-sideline] width calculation wrong when using left-margin-width' and right-margin-width' [lsp-ui-sideline] Width calculation wrong when using left-margin-width' and right-margin-width' Jan 1, 2018
@sebastiencs
Copy link
Member

sebastiencs commented Jan 1, 2018

I don't have any problems with margins.
It seems that there is a new line or a tab in the message. Can you test if 8487eec fixes the issue ?

@terlar
Copy link
Author

terlar commented Jan 2, 2018

No this didn't change anything, it seems the left-margin-width doesn't affect after all. But I can easily reproduce by using (setq right-margin-width 1) and (setq right-margin-width 0). When I toggle between these two settings and refresh the line will wrap/not-wrap.

It might be related to some combination with some other setting, but the right-margin-width is definitely something that triggers it.

@terlar
Copy link
Author

terlar commented Jan 2, 2018

The theory was correct I also need to use:

(setq fringes-outside-margins t)

If i set this one to nil it won't wrap either. Might have even more settings that affects this, will try to check some more.

@sebastiencs
Copy link
Member

Yes, I can reproduce.
b2fc92a should fix it

@terlar
Copy link
Author

terlar commented Jan 2, 2018

Yes, this fixes it, thank you for the quick resolution. I was looking through the code-base a bit and searching for some width calculation, but I am not so familiar with the code base yet.

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

No branches or pull requests

2 participants