mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-02 10:16:21 +00:00
make macros repeatable
This commit is contained in:
parent
356160ec5c
commit
b8aadff071
@ -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]) {
|
||||
|
Loading…
Reference in New Issue
Block a user