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
Fixed asm.bytes on by default in cursor mode #10157
Conversation
0d33dc5
to
521d4eb
Compare
asm.bytes is boolean type, what about toggling it instead? |
anyway, maybe we should discuss for a better way to do that. because we want to get the bytes or not? because maybe the cursor in disasm without bytes should just scroll around instructions and ignore bytes :? |
I decided not to toggle it because if the user wanted to see bytes in disasm without the cursor, then entering and exiting cursor mode will disable the bytes (and that would be something the user will not expect nor want). This way it "remembers" the previous state and won't disable bytes when exiting cursor mode if it was enabled before by the user. However I understand that the implementation is a bit confusing, maybe I can change it by adding a config variable to be more clear in the code.
Reading issue #9847 I assumed that bytes should be always on when entering cursor mode, but if I misunderstood tell me so I'll close this pr and continue discussion on the issue page. |
maybe its better to add a key to toggle the bytes instead of making this behaviour by default. what do you think? |
Imho that's not a bad idea, we could use for example |
I is already used. but not in the help message of V? |
Anyway. do you have any suggestions? Maybe a special character like |
nope. i = write, I = insert
… On 31 May 2018, at 17:23, Luca Di Bartolomeo ***@***.***> wrote:
I is not listed in the V? help maybe because it is an alias of i...?
Anyway. do you have any suggestions? Maybe a special character like ~ or ', or even #?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#10157 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA3-loQhnk25QBCrU3560yK56IQsW8dYks5t4Ar-gaJpZM4UIgKj>.
|
can you update the help message to add ‘I’ ?
about which char to use for toggling bytes.. im not sure :?
not sure if wW is anything useful.. we should have a discussion on all the viusal keys imho
… On 31 May 2018, at 17:23, Luca Di Bartolomeo ***@***.***> wrote:
I is not listed in the V? help maybe because it is an alias of i...?
Anyway. do you have any suggestions? Maybe a special character like ~ or ', or even #?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#10157 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA3-loQhnk25QBCrU3560yK56IQsW8dYks5t4Ar-gaJpZM4UIgKj>.
|
Fix whitespace in visual.c Refactoring cursor in visual.c Revert asm.bytes false by default
521d4eb
to
ee2dfc5
Compare
libr/core/visual.c
Outdated
@@ -2484,6 +2486,9 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) { | |||
case ')': | |||
rotateAsmemu (core); | |||
break; | |||
case '#': | |||
r_core_cmd0 (core, "e!asm.bytes"); |
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.
use the api: r_config_toggle(core->config, "asm.bytes");
sorry for my late review. change this and i'll merge. thanks!! |
Closes #9847
EDIT:
Remade this pr, now press # to toggle bytes when in disasm view.
No more turning on by default when switching to cursor.
OLD_PR:
When toggling the cursor,
asm.bytes
goes on and off.However, if the user had specified before that
e asm.bytes = true
, then bytes are kept being shown even when exiting cursor mode.This is done in a little hackish way:
asm.bytes = asm.bytes + 1
when switching to cursor modeasm.bytes = asm.bytes - 1
when switching off cursor mode(this means that
asm.bytes = 2
when it was set by the user and then switched to cursor mode),but doing like this avoids adding another config variable.
Tell me if it's too confusing.