From ee2dfc51eb63338efc4b651679b382105b9fc307 Mon Sep 17 00:00:00 2001 From: cyanpencil Date: Tue, 22 May 2018 11:46:52 +0200 Subject: [PATCH 1/2] Fixed asm.bytes on by default in cursor mode Fix whitespace in visual.c Refactoring cursor in visual.c Revert asm.bytes false by default --- libr/core/visual.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libr/core/visual.c b/libr/core/visual.c index a18e6e7869bdb..5e5827067bea7 100644 --- a/libr/core/visual.c +++ b/libr/core/visual.c @@ -251,6 +251,7 @@ static int visual_help() { " = set cmd.vprompt (top row)\n" " | set cmd.cprompt (right column)\n" " . seek to program counter\n" + " # toggle bytes in disasm view\n" " \\ toggle visual split mode\n" " \" toggle the column mode (uses pC..)\n" " / in cursor mode search in current block\n" @@ -274,6 +275,7 @@ static int visual_help() { " gG go seek to begin and end of file (0-$s)\n" " hjkl move around (or HJKL) (left-down-up-right)\n" " i insert hex or string (in hexdump) use tab to toggle\n" + " I insert hexpair block \n" " mK/'K mark/go to Key (any key)\n" " M walk the mounted filesystems\n" " n/N seek next/prev function/flag/hit (scr.nkey)\n" @@ -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"); + break; case '*': if (core->print->cur_enabled) { r_core_cmdf (core, "dr PC=0x%08"PFMT64x, core->offset + core->print->cur); From d5ba3c59f97ddf7255c770daa54de6df760507df Mon Sep 17 00:00:00 2001 From: cyanpencil Date: Wed, 6 Jun 2018 16:56:46 +0200 Subject: [PATCH 2/2] changed r_core_cmd0 with r_config_toggle --- libr/core/visual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/core/visual.c b/libr/core/visual.c index 5e5827067bea7..81e69d7535001 100644 --- a/libr/core/visual.c +++ b/libr/core/visual.c @@ -2487,7 +2487,7 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) { rotateAsmemu (core); break; case '#': - r_core_cmd0 (core, "e!asm.bytes"); + r_config_toggle (core->config, "asm.bytes"); break; case '*': if (core->print->cur_enabled) {