From b8aadff07173a9626b4e27fc7045a0e4b6841c75 Mon Sep 17 00:00:00 2001 From: Ayman Khamouma Date: Fri, 22 Apr 2016 10:52:25 +0200 Subject: [PATCH] make macros repeatable --- libr/core/cmd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libr/core/cmd.c b/libr/core/cmd.c index c23fcdbfa3..714f35bbeb 100644 --- a/libr/core/cmd.c +++ b/libr/core/cmd.c @@ -545,6 +545,11 @@ static int cmd_interpret(void *data, const char *input) { break; case '(': r_cmd_macro_call (&core->rcmd->macro, input+1); + str = r_str_newf (".%s", input); + if (str) { + free (core->lastcmd); + core->lastcmd = str; + } break; case '?':{ const char* help_msg[] = { @@ -2384,6 +2389,10 @@ R_API void r_core_cmd_repeat(RCore *core, int next) { return; if (core->lastcmd) switch (*core->lastcmd) { + case '.': + if (core->lastcmd[1] == '(') // macro call + r_core_cmd0 (core, core->lastcmd); + break; case 'd': // debug r_core_cmd0 (core, core->lastcmd); switch (core->lastcmd[1]) {