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

[BUG] new-selection not working for values exceeding the number of rows of previous run #2037

Open
2 tasks done
neunato opened this issue Oct 3, 2024 · 4 comments
Open
2 tasks done
Labels
Milestone

Comments

@neunato
Copy link

neunato commented Oct 3, 2024

Rofi version (rofi -v)

1.7.5

Configuration

https://gist.github.com/neunato/d652537be9964c1517979af937e49889

Theme

https://gist.github.com/neunato/4b593b7b9df80c50387d1f2ba575c996

Timing report

https://gist.github.com/neunato/074b317a1292d9af057a8b8221443ef8

Launch command

rofi -show test -modes test:./script.sh

Step to reproduce

Create a new file script.sh with the following contents:

#!/bin/bash

echo -e "\0keep-selection\x1ftrue"

if [[ -z $1 || $1 == "back" ]]; then
   echo -e "\0new-selection\x1f3"
   echo "forth"
   echo "forth"
   echo "forth"
   echo "forth"
else
   echo -e "\0new-selection\x1f2"
   echo "back"
   echo "back"
   echo "back"
fi

Launch rofi

rofi -show test -modes test:./script.sh

Press enter twice

Expected behavior

The last row is selected whenever the entries are updated.

2024-10-04.09.48.47.99660.mp4

Actual behavior

The first row is selected when menu updated from 3 to 4 rows. The other direction works.

2024-10-04.01.30.29.10497.mp4

Additional information

Selecting the first/second/third row in the four-row menu works. Selecting any number larger than the previous menu size results in the first row being selected, even if the updated menu has enough rows.

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
@neunato neunato added the bug label Oct 3, 2024
@DaveDavenport DaveDavenport added this to the 1.7.6 milestone Oct 4, 2024
@DaveDavenport
Copy link
Collaborator

Yep, good catch.. Going to a bit tricky one to fix 😄

@DaveDavenport DaveDavenport modified the milestones: 1.7.6, 1.7.7 Oct 11, 2024
@DaveDavenport
Copy link
Collaborator

This is going to require some rewriting of parts, so moving it to one later release to fix regrettable.

@neunato
Copy link
Author

neunato commented Oct 12, 2024

That's unfortunate but I don't mind as this patch solved my issues.

Surely something else is now broken, but I don't seem to be using it as all my menus work :)

@DaveDavenport
Copy link
Collaborator

Yes, that patch breaks some functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants