davatorium/rofi

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

itspec-ru opened this issue · 6 comments

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

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

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

Can you test if commit fixes it?

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

Thanks for testing!

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.