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

Incorrect display of text for too long strings when displaying a message in the "Error message" #1943

Closed
1 of 2 tasks
itspec-ru opened this issue Feb 15, 2024 · 6 comments
Closed
1 of 2 tasks
Labels
Milestone

Comments

@itspec-ru
Copy link

itspec-ru commented Feb 15, 2024

Rofi version (rofi -v)

1.7.5-178-git-9cea843b (git-r3/HEAD)

Configuration

https://gist.github.com/itspec-ru/c97ade4617b37a7c178e5c4fa942832c

Theme

https://gist.github.com/itspec-ru/9cb5b44dc3bda3b835d67077e367b152

Timing report

No response

Launch command

rofi -e $(echo "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345")

Step to reproduce

rofi -e $(echo "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345")

Expected behavior

In "Error message box" must displayed
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345

Actual behavior

but in reality, the line is displayed shorter
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234

Additional information

bash script for testing

#!/bin/sh

# Incorrect calculation of the lines number for "Error message" if strings too long

# For example, I need to display two lines on the screen in the "Error message".

# string of 94 character
TEXT1="1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
text"

# string of 95 character
TEXT2="12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
text"

# string of 95 character +\n
TEXT3="12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
text
"

# workarpund
TEXT4="${TEXT2}
"

# "text" is visible
rofi -e "${TEXT1}"

# !!!!!!!!!!!
# "text" is disappeared
rofi -e "${TEXT2}"

# "text" is visible
rofi -e "${TEXT3}"

# "text" is visible
rofi -e "${TEXT4}"

Using wayland display server protocol

  • No, I don't use the wayland display server protocol

I've checked if the issue exists in the latest stable release

  • Yes, I have checked the problem exists in the latest stable version
@itspec-ru itspec-ru added the bug label Feb 15, 2024
@itspec-ru itspec-ru changed the title [BUG] Incorrect calculation of the lines number for "Error message" if strings too long [BUG] Incorrect display of text for too long lines when displaying a message in the "Error message" Feb 15, 2024
@itspec-ru itspec-ru changed the title [BUG] Incorrect display of text for too long lines when displaying a message in the "Error message" Incorrect display of text for too long strings when displaying a message in the "Error message" Feb 15, 2024
@DaveDavenport
Copy link
Collaborator

it looks like it depend on theme, odd.
rofi-2024-02-15-0830-00001
rofi-2024-02-15-0830-00000

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Feb 15, 2024

rofi-2024-02-15-0834-00000
setting window width from 50.1% to 50.2% fixes it.

Problem is when calculating height of window pango returns 1 line (no wrap), but wraps when rendering.. so this code needs to be checked.
When setting height on window:
rofi-2024-02-15-0841-00000

@DaveDavenport
Copy link
Collaborator

Can you test if commit fixes it?

@itspec-ru
Copy link
Author

Yes... The last commit fixes it. Thanks!

@DaveDavenport
Copy link
Collaborator

Thanks for testing!

@DaveDavenport DaveDavenport added this to the 1.7.6 milestone Feb 15, 2024
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants