Make scr.gadgets true by default ##visual

This commit is contained in:
radare 2019-04-19 17:57:45 +02:00 committed by GitHub
parent aaf93c20d5
commit 83b62183d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -3268,7 +3268,7 @@ R_API int r_core_config_init(RCore *core) {
// DEPRECATED: USES hex.cols now SETI ("scr.colpos", 80, "Column position of cmd.cprompt in visual");
SETCB ("scr.breakword", "", &cb_scrbreakword, "Emulate console break (^C) when a word is printed (useful for pD)");
SETCB ("scr.breaklines", "false", &cb_breaklines, "Break lines in Visual instead of truncating them");
SETCB ("scr.gadgets", "false", &cb_scr_gadgets, "Run pg in prompt, visual and panels");
SETCB ("scr.gadgets", "true", &cb_scr_gadgets, "Run pg in prompt, visual and panels");
SETICB ("scr.columns", 0, &cb_scrcolumns, "Force console column count (width)");
SETPREF ("scr.dumpcols", "false", "Prefer pC commands before p ones");
SETCB ("scr.rows", "0", &cb_scrrows, "Force console row count (height) ");

View File

@ -3414,24 +3414,25 @@ static int agraph_print(RAGraph *g, int is_interactive, RCore *core, RAnalFuncti
}
r_cons_canvas_print_region (g->can);
if (is_interactive) {
r_cons_newline ();
}
if (is_interactive) {
r_cons_newline ();
const char *cmdv = r_config_get (core->config, "cmd.gprompt");
bool mustFlush = false;
r_cons_visual_flush ();
if (cmdv && *cmdv) {
r_cons_gotoxy (0, 2);
r_cons_strcat (Color_RESET);
r_core_cmd0 (core, cmdv);
mustFlush = true;
}
if (core && core->scr_gadgets) {
r_core_cmd0 (core, "pg");
}
if (mustFlush) {
r_cons_flush ();
}
}
if (core && core->scr_gadgets) {
r_core_cmd0 (core, "pg");
r_cons_flush ();
}
return true;
}