Honor scr.scrollbar in visual graph ##visual

This commit is contained in:
pancake 2019-04-03 02:29:10 +02:00
parent 105b5c1fab
commit a172beb501
3 changed files with 11 additions and 3 deletions

View File

@ -3492,7 +3492,13 @@ static int agraph_refresh(struct agraph_refresh_data *grd) {
}
}
return agraph_print (g, grd->fs, core, *fcn);
int res = agraph_print (g, grd->fs, core, *fcn);
if (r_config_get_i (core->config, "scr.scrollbar")) {
r_core_print_scrollbar (core);
}
return res;
}
static void agraph_refresh_oneshot(struct agraph_refresh_data *grd) {

View File

@ -3615,7 +3615,8 @@ static int visual_responsive(RCore *core) {
}
// TODO: use colors
static void scrollbar(RCore *core) {
// TODO: find better name
R_API void r_core_print_scrollbar(RCore *core) {
int i, h, w = r_cons_get_size (&h);
if (w < 10 || h < 3) {
@ -3805,7 +3806,7 @@ static void visual_refresh(RCore *core) {
printSnow (core);
}
if (r_config_get_i (core->config, "scr.scrollbar")) {
scrollbar (core);
r_core_print_scrollbar (core);
}
}

View File

@ -385,6 +385,7 @@ R_API int r_core_block_size(RCore *core, int bsize);
R_API int r_core_seek_size(RCore *core, ut64 addr, int bsize);
R_API int r_core_is_valid_offset (RCore *core, ut64 offset);
R_API int r_core_shift_block(RCore *core, ut64 addr, ut64 b_size, st64 dist);
R_API void r_core_print_scrollbar(RCore *core);
R_API void r_core_visual_prompt_input (RCore *core);
R_API void r_core_visual_toggle_decompiler_disasm(RCore *core, bool for_graph, bool reset);
R_API int r_core_visual_refs(RCore *core, bool xref, bool fcnInsteadOfAddr);