excalibur1234 / pacui

Bash script providing advanced Pacman and Yay/Pikaur/Aurman/Pakku/Trizen/Pacaur/Pamac-cli functionality in a simple UI
GNU General Public License v3.0
168 stars 13 forks source link

long discriptions break install ui #61

Closed unmellow closed 3 years ago

unmellow commented 3 years ago

I installed and tested pacui and pacui-git from manjaro community found this bug in both but the one being displayed is pacui-git-1.14.r6.g846f892-1

I initially found this bug while testing my fork which is from master so I'm pretty sure it is still their

2021-01-25T22:21:17,049134462-05:00 2021-01-25T22:21:10,569162832-05:00 2021-01-25T22:20:55,592891707-05:00 2021-01-25T22:20:36,209541351-05:00 2021-01-25T22:20:12,759310565-05:00

excalibur1234 commented 3 years ago

i have reproduced the bug, despite being a little elusive.

it only appears, when i have entered a search string. it disappears, when i change my terminal width (and reappears in other lines).

i report back, when i have more information.

excalibur1234 commented 3 years ago

i have narrowed it down to a bug in the search result display of fzf: the follow command in your terminal is enough to reproduce this bug: expac -S "%-33n\t%d" | fzf --preview 'echo text' now, search for a string, e.g. "e" and scroll to search results with long description texts (e.g. by holding down your PageUp key).

can you reproduce this behavior?

strangely enough, the search result page of fzf seems to be arranged by total sting length. however, it seems to be broken, because when i scroll through the entire search result list, i can see 2 parts. both are arranged by total string length. only one part/block seems to produce this bug.

excalibur1234 commented 3 years ago

i do not see any way i can fix this bug (besides removing the preview window completely, which i am not willing to do).

feel free to further investigate this bug. you can start with the command i have given above. maybe certain symbols (e.g. newlines, tabs, or spaces) within some description strings causes this bug. then, you can report it upstream (i.e. here: https://github.com/junegunn/fzf)

when you do this, feel free to link this issue.

excalibur1234 commented 3 years ago

after some more testing, i think i have found a solution.

on my system using the following command (as described 2 posts above) results in this bug: expac -S "%-33n\t%d" | fzf --preview 'echo text' however this command does NOT show the bug: expac -S "%-33n %d" | fzf --preview 'echo text'

it seems the tab (i.e. "\t" in the printf statement) symbol causes this bug.

can you confirm this behavior?

if your system also shows this bug only with one of the commands above, i can actually fix this bug.

unmellow commented 3 years ago

yes this command

expac -S "%-33n %d" | fzf --preview 'echo text'

doesn't appear to have the bug the examples i found render correctly now

excalibur1234 commented 3 years ago

fixed in 195d8f59277399b9a0b730123840532cc4900229

thanks for working with me to resolve this bug!