Skip to content

Show less entries in Omnibar by default#3592

Draft
PremadeS wants to merge 3 commits intorizinorg:devfrom
PremadeS:omnibar-lag
Draft

Show less entries in Omnibar by default#3592
PremadeS wants to merge 3 commits intorizinorg:devfrom
PremadeS:omnibar-lag

Conversation

@PremadeS
Copy link
Copy Markdown
Collaborator

@PremadeS PremadeS commented Mar 26, 2026

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've updated the documentation with the relevant information (if needed)
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

In binaries which contain a large amount of flags, searching through the omnibar (the universal bar at the top) becomes a pain. Typing every character initiates a search through all, potentially thousands of flags.
This PR does the following:

  • Shows 100 flag matches by default
  • Gives two new entries at the bottom only if there are more matches than currently shown
    • Show More
    • Show All (also shows the current amount of results shown and total matches)
  • Pressing "Show More" will show 100 more entries and "Show All" will show all of the found matches
  • Ctrl + Return triggers "Show More"
  • Ctrl + Shift + Return triggers "Show All"
  • Return jumps to the address of flag, just as before
  • When selecting "Show More" or "Show All" entries inside the completer, the original text (whatever was shown in the omnibar before selecting Show More/All) is preserved i.e: it doesn't autofill searchbar to "Show More"

Note that the number of visible entries resets back to 100 when the text is changed by the user (i.e: typing more characters or deleting)
Also the results are sorted by numeric mode, meaning sym.secret.100 will be shown after sym.secret.99

Test plan (required)

  • Open Cutter with a large binary OR add a large amount of flags manually - maybe through rizin script
    • Refresh if you added flags manually View->Refresh Contents OR Ctrl + R
  • Search for flag name in omnibar. Note that similar to before the search is "MatchContains" meaning if the flag name contains what's typed in the omnibar - it will count as a match and will be shown
  • Observe it doesn't lag
  • Scroll to the bottom of entries
  • Try Show More and Show All
  • Observe Show More and Show All don''t change the typed text and they are hidden if match count is not more than visible entries

I was also thinking it would be nice to provide users with the ability to change the default 100 entries count through preferences, user might also have the option to force Show All
it would require a new tab in preferences because more customizations for other widgets might be added in the future

Media
Comparison, searching through a list of 200,000 flags
Before:
omnibar-before

After (lag on scrolling is just the gif):
omnibar-after

Closing issues

closes #3581

Comment thread src/widgets/Omnibar.cpp
#include <QKeyEvent>

namespace {
constexpr int DEFAULT_ITEM_COUNT = 100;
Copy link
Copy Markdown
Member

@wargio wargio Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this should be configurable as if i use the screen in portrait mode, i may want to see more results.

Copy link
Copy Markdown
Collaborator Author

@PremadeS PremadeS Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I mentioned that in the PR description

There should be a new tab for options similar to this, If I add it right now it would conflict with #3580 as the configurable options from QuickFilterView should be moved to this "new tab" as well.
I'll add the option as soon as #3580 is merged

@PremadeS PremadeS marked this pull request as draft March 27, 2026 13:38
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

Successfully merging this pull request may close these issues.

Seek bar causes horrible lag

2 participants