Vr refresh visual screen

This commit is contained in:
pancake 2017-02-06 00:24:01 +01:00
parent 88bc00cd76
commit 1cac404463
2 changed files with 15 additions and 9 deletions

View File

@ -223,7 +223,7 @@ static int visual_help() {
" O toggle asm.esil\n"
" p/P rotate print modes (hex, disasm, debug, words, buf)\n"
" q back to radare shell\n"
" r browse anal info and comments / in cursor mode = remove byte\n"
" r refresh screen / in cursor mode browse comments\n" // browse anal info and comments / in cursor mode = remove byte\n"
" R randomize color palette (ecr)\n"
" sS step / step over\n"
" t browse types\n"
@ -1648,7 +1648,11 @@ R_API int r_core_visual_cmd(RCore *core, int ch) {
r_core_visual_xrefs_X (core);
break;
case 'r':
r_core_visual_comments (core);
if (core->print->ocur != -1) {
r_core_visual_comments (core);
} else {
visual_refresh (core);
}
break;
case ' ':
case 'V':

View File

@ -1311,8 +1311,9 @@ R_API int r_core_visual_comments (RCore *core) {
}
} else free (str);
}
if (!next)
if (!next) {
break;
}
cur = next;
}
}
@ -1345,12 +1346,14 @@ R_API int r_core_visual_comments (RCore *core) {
//TODO
break;
case 'd':
if (p)
if (p) {
r_meta_del (core->anal, R_META_TYPE_ANY, from, size, p);
}
break;
case 'P':
if (--format<0)
if (--format < 0) {
format = MAX_FORMAT;
}
break;
case 'p':
format++;
@ -1398,9 +1401,7 @@ R_API int r_core_visual_comments (RCore *core) {
r_cons_any_key (NULL);
break;
}
if (p) {
R_FREE (p);
}
R_FREE (p);
}
return true;
}
@ -1418,8 +1419,9 @@ static void config_visual_hit(RCore *core, const char *name, int editor) {
char buf[1024];
RConfigNode *node;
if (!(node = r_config_node_get (core->config, name)))
if (!(node = r_config_node_get (core->config, name))) {
return;
}
if (node->flags & CN_BOOL) {
r_config_set_i (core->config, name, node->i_value? 0:1);
} else {