Skip to content

Commit

Permalink
Merge branch 'dev' into apply-relocs
Browse files Browse the repository at this point in the history
  • Loading branch information
thestr4ng3r authored Apr 1, 2021
2 parents dc6f6d9 + eddd2d1 commit 9abe9bc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
7 changes: 4 additions & 3 deletions librz/cons/cons.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,9 @@ RZ_API void rz_cons_gotoxy(int x, int y) {
#endif
}

RZ_API void rz_cons_print_clear(void) {
rz_cons_strcat("\x1b[0;0H\x1b[0m");
RZ_API void rz_cons_goto_origin_reset(void) {
rz_cons_gotoxy(0, 0);
rz_cons_strcat(Color_RESET);
}

RZ_API void rz_cons_fill_line(void) {
Expand Down Expand Up @@ -1971,4 +1972,4 @@ RZ_API void rz_cons_clear_buffer(void) {
*/
RZ_API void rz_cons_set_flush(bool flush) {
CTX(noflush) = !flush;
}
}
6 changes: 2 additions & 4 deletions librz/core/visual.c
Original file line number Diff line number Diff line change
Expand Up @@ -3756,12 +3756,10 @@ static void visual_refresh(RzCore *core) {

int w = visual_responsive(core);

if (autoblocksize) {
rz_cons_gotoxy(0, 0);
} else {
if (!autoblocksize) {
rz_cons_clear();
}
rz_cons_print_clear();
rz_cons_goto_origin_reset();
rz_cons_flush();

int hex_cols = rz_config_get_i(core->config, "hex.cols");
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_cons.h
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ RZ_API void rz_cons_context_break_pop(RzConsContext *context, bool sig);
RZ_API char *rz_cons_editor(const char *file, const char *str);
RZ_API void rz_cons_reset(void);
RZ_API void rz_cons_reset_colors(void);
RZ_API void rz_cons_print_clear(void);
RZ_API void rz_cons_goto_origin_reset(void);
RZ_API void rz_cons_echo(const char *msg);
RZ_API void rz_cons_zero(void);
RZ_API void rz_cons_highlight(const char *word);
Expand Down
2 changes: 1 addition & 1 deletion test/db/cmd/cmd_visual
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ e scr.rows=12
?e
EOF
EXPECT=<<EOF
[?25l[?25l[0x00005ae0 [Xadvc]0 11% 192 bins/elf/ls]> xc @ entry0
[?25l[?25l[0x00005ae0 [Xadvc]0 11% 192 bins/elf/ls]> xc @ entry0
- offset - 0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF comment
0x00005ae0 f30f 1efa 31ed 4989 d15e 4889 e248 83e4 ....1.I..^H..H.. ; entry0
0x00005af0 f050 544c 8d05 660c 0100 488d 0def 0b01 .PTL..f...H.....
Expand Down

0 comments on commit 9abe9bc

Please sign in to comment.