-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Add file percentage in visual mode (V/Vv) #4494
Conversation
it would be nice to at least have one big struct and just one global. |
For those like me not seeing it, percentage is on the lower corner in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see where the global added. While they should be eliminated, if you really plan to remove them in bulk from vmenus.c
- I suppose it's okay for now.
Please rebase to fix the red CI |
Sorry, I don't get it. I think I didn't add percentage in |
* add new strcut RzCoreVisualView to store old global variables * move some variables related to visual view in RzCoreVisual to RzCoreVisualView
kinda. i actually never seen the perc value thus that is why i was actively searching for it :D ignore my comment :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
@PeiweiHu it doesn't work in the simple visual mode. Simply do |
What's interesting, that it works in the "last" of the visual modes (the "hexII" mode, the "sparse hexdump", press |
PLEASE DON'T SQUASH
two commits are individual
Your checklist for this pull request
Detailed description
calculation logics
For Vv, the percentage is calculated based on the lines of output in the right column:
current_line_no / total_line_num
For V, the percentage is calculated based on the percentage of the current address against the mapped section memory:
(address - section_start_addr) / section_size
This pr adds a static global variable:
No worries. I will remove it with other related global variables in subsequent pr.
Test plan
manual test since we don't have a mechanism for testing tui
Closing issues
closes #4477
Screen.Recording.2024-05-16.at.15.43.32.mov