Honor asm.indent and only toggle in disasm

This commit is contained in:
pancake 2019-03-04 01:45:12 +01:00 committed by radare
parent 38a0343e62
commit 9583885a72
2 changed files with 8 additions and 3 deletions

View File

@ -2975,8 +2975,8 @@ static void ds_print_indent(RDisasmState *ds) {
}
static void ds_print_opstr(RDisasmState *ds) {
ds_print_indent (ds);
if (ds->asm_instr) {
ds_print_indent (ds);
r_cons_strcat (ds->opstr);
ds_print_color_reset (ds);
}

View File

@ -89,8 +89,9 @@ static void toggle_decompiler_disasm(RCore *core) {
} else {
hold = r_config_hold_new (core->config);
r_config_hold_s (hold, "asm.hint.pos", "asm.cmt.col", "asm.offset",
"asm.bytes", "asm.comments", "asm.usercomments", "asm.instr", NULL);
"asm.indent", "asm.bytes", "asm.comments", "asm.usercomments", "asm.instr", NULL);
r_config_set (core->config, "asm.hint.pos", "0");
r_config_set (core->config, "asm.indent", "true");
r_config_set (core->config, "asm.cmt.col", "0");
r_config_set (core->config, "asm.offset", "false");
r_config_set (core->config, "asm.bytes", "false");
@ -3220,7 +3221,11 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
rotateAsmemu (core);
break;
case '#':
toggle_decompiler_disasm (core);
if (core->printidx == 1) {
toggle_decompiler_disasm (core);
} else {
// do nothing for now :?, px vs pxa?
}
break;
case '*':
if (core->print->cur_enabled) {