Fix : command ##visual (#11940)

This commit is contained in:
Vanellope 2018-10-26 02:40:56 +09:00 committed by radare
parent 351c762c54
commit bbd07a2f7f

View File

@ -898,6 +898,11 @@ static void handleZoomMode(RCore *core, const int key) {
savePanelPos (&panel[panels->curnode]); savePanelPos (&panel[panels->curnode]);
maximizePanelSize (panels); maximizePanelSize (panels);
break; break;
case ':':
r_core_visual_prompt_input (core);
panels->panel[panels->curnode].addr = core->offset;
setRefreshAll (panels);
break;
} }
} }
@ -2530,6 +2535,7 @@ static int file_history_down(RLine *line) {
static void handleMenu(RCore *core, const int key, int *exit) { static void handleMenu(RCore *core, const int key, int *exit) {
RPanels *panels = core->panels; RPanels *panels = core->panels;
RPanel *panel = panels->panel;
RPanelsMenu *menu = panels->panelsMenu; RPanelsMenu *menu = panels->panelsMenu;
RPanelsMenuItem *parent = menu->history[menu->depth - 1]; RPanelsMenuItem *parent = menu->history[menu->depth - 1];
RPanelsMenuItem *child = parent->sub[parent->selectedIndex]; RPanelsMenuItem *child = parent->sub[parent->selectedIndex];
@ -2566,6 +2572,19 @@ static void handleMenu(RCore *core, const int key, int *exit) {
break; break;
case 'Z': case 'Z':
handleTabKey (core, true); handleTabKey (core, true);
case ':':
{
r_core_visual_prompt_input (core);
int i;
for (i = 0; i < panels->n_panels; i++) {
if (!strcmp (panel[i].cmd, PANEL_CMD_DISASSEMBLY)) {
panel[i].addr = core->offset;
break;
}
}
setRefreshAll (panels);
}
break;
} }
} }
@ -3047,13 +3066,8 @@ repeat:
} }
break; break;
case ':': case ':':
core->vmode = false;
r_core_visual_prompt_input (core); r_core_visual_prompt_input (core);
core->vmode = true; panels->panel[panels->curnode].addr = core->offset;
// FIX: Issue with visual mode instruction highlighter
// not updating after 'ds' or 'dcu' commands.
r_core_cmd0 (core, ".dr*");
setRefreshAll (panels); setRefreshAll (panels);
break; break;
case 'c': case 'c':