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

Truncate long lines #25

Merged
merged 4 commits into from
Nov 3, 2024
Merged

Truncate long lines #25

merged 4 commits into from
Nov 3, 2024

Conversation

Azkae
Copy link
Contributor

@Azkae Azkae commented Nov 2, 2024

Add a setting to allow truncation. Fixes #24 (see latest comment)

Truncation is available on lines that have at least sideline-truncate-min-available-space-ratio of available space (50% by default).
The minium available space check is made to avoid the case where there is very few space available on the next line. The message would be almost non visible.

We could also find the longest line if the message doesn't fit but that seemed a bit too complicated to implement, and this seems to work well.
WDYT?

@jcs090218
Copy link
Member

LGTM! Can we add three dots ... (make it a custom variable) at the end to indicate the sideline is not fully shown? 🤔

@Azkae
Copy link
Contributor Author

Azkae commented Nov 3, 2024

Good idea, I have added it as sideline-truncate-suffix

@jcs090218
Copy link
Member

LGTM! Thank you for your contribution! :D

@jcs090218 jcs090218 merged commit 4287929 into emacs-sideline:master Nov 3, 2024
11 checks passed
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.

Error messages not displayed at all for long lines
2 participants