From e0a5320da701061ffac43c41355545d63ceb8337 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Tue, 17 Jan 2017 13:54:21 +0100
Subject: Underline the currently decoded field
---
hex.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hex.c b/hex.c
index a22ed2a..96a6ffe 100644
--- a/hex.c
+++ b/hex.c
@@ -378,9 +378,14 @@ app_make_row (struct row_buffer *buf, int64_t addr, int attrs)
}
else
{
+ int cell_attrs = attrs;
+ if (cell_addr >= g_ctx.view_cursor
+ && cell_addr < g_ctx.view_cursor + 8)
+ cell_attrs |= A_UNDERLINE;
+
uint8_t cell = g_ctx.data[cell_addr - g_ctx.data_offset];
char *hex = xstrdup_printf ("%02x", cell);
- row_buffer_append (buf, hex, attrs);
+ row_buffer_append (buf, hex, cell_attrs);
free (hex);
str_append_c (&ascii, (cell >= 32 && cell < 127) ? cell : '.');
--
cgit v1.2.3-70-g09d2