diff --git a/libr/core/cconfig.c b/libr/core/cconfig.c index 169e156e39..08083d441b 100644 --- a/libr/core/cconfig.c +++ b/libr/core/cconfig.c @@ -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) "); diff --git a/libr/core/graph.c b/libr/core/graph.c index 807ccb6480..5c67e8a314 100644 --- a/libr/core/graph.c +++ b/libr/core/graph.c @@ -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; }