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

Highlight misalignment #78

Open
cloak1505 opened this issue Jun 8, 2024 · 3 comments
Open

Highlight misalignment #78

cloak1505 opened this issue Jun 8, 2024 · 3 comments

Comments

@cloak1505
Copy link

cloak1505 commented Jun 8, 2024

Edit: Sorry, I didn't realize this is Issue #12. Close?

Often we have to adjust the display width to realign the token highlights.

As a non-coder at first I imagined it has something to do with the highlight hitting the margin before the text does. When you shrink the display, you can see the highlight get pushed to the next line before the text. But it's not as simple as extending the highlighting's margin by 1 pixel. I remember that most tokens start with a space, and I notice a space at the end of a line may or may not be "rendered" depending on whether it fits.

No clue how to solve this without adding bloat. SillyTavern does Token Probabilities in a separate panel with uneditable words and only for the newest message. Mikupad has highlighting over editable text because it's cool like that.

mikupad highlight glitch

@Cyantime
Copy link

Cyantime commented Jun 12, 2024

This is from the text extending into where a scroll bar would be but the highlight doesn't, if you reduce the window height to force it to overflow and show the scroll bar the highlight syncs up properly.

I slapped overflow-y: scroll into the prompt-container textarea and it worked, someone with actual webdev whatever could do a better job.

@cloak1505
Copy link
Author

This is from the text extending into where a scroll bar would be but the highlight doesn't, if you reduce the window height to force it to overflow and show the scroll bar the highlight syncs up properly.

Oh you're right.

Meanwhile I'm gonna slip in a tiny nitpick: the wrench icon position looks a bit ugly when the scrollbar appears.

image

@lmg-anon
Copy link
Owner

lmg-anon commented Jun 29, 2024

Edit: Sorry, I didn't realize this is Issue #12. Close?

Yes, this is likely a duplicate of #12, but it's hard to say if it's really the same issue because I remember it was happening even when the scroll bar was visible.

This is from the text extending into where a scroll bar would be but the highlight doesn't, if you reduce the window height to force it to overflow and show the scroll bar the highlight syncs up properly.

I'm really confused about why this would happen... However, if it's as you say, this is likely an easy fix.

Meanwhile I'm gonna slip in a tiny nitpick: the wrench icon position looks a bit ugly when the scrollbar appears.

I agree. However, it's not something that bothered me enough for me to fix it myself lol

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

3 participants