From 913a8563fe1c0c8b2faf9bf5522da219d4cd6d8d Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 15 Nov 2018 03:08:44 +0100 Subject: [PATCH] Improve the visual titlebar in cursor is enabled ##visual --- libr/core/visual.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libr/core/visual.c b/libr/core/visual.c index c2ff2c748b..a70e628243 100644 --- a/libr/core/visual.c +++ b/libr/core/visual.c @@ -3120,11 +3120,17 @@ R_API void r_core_visual_title(RCore *core, int color) { core->offset, core->print->cur); } else { if (core->print->cur_enabled) { - title = r_str_newf ("[0x%08"PFMT64x " %s%d (0x%x:%d=%d)]> %s %s\n", - core->offset, pcs, core->blocksize, - core->print->cur, core->print->ocur, core->print->ocur == -1 ? - 1: R_ABS (core->print->cur - core->print->ocur) + 1, - bar, pos); + if (core->print->ocur == -1) { + title = r_str_newf ("[0x%08"PFMT64x " *0x%08"PFMT64x" ($$+0x%x)]> %s %s\n", + core->offset, core->offset + core->print->cur, + core->print->cur, + bar, pos); + } else { + title = r_str_newf ("[0x%08"PFMT64x " 0x%08"PFMT64x" [0x%x..0x%x] %d]> %s %s\n", + core->offset, core->offset + core->print->cur, + core->print->ocur, core->print->cur, R_ABS (core->print->cur - core->print->ocur) + 1, + bar, pos); + } } else { title = r_str_newf ("[0x%08"PFMT64x " %s%d %s]> %s %s\n", core->offset, pcs, core->blocksize, filename, bar, pos);