Underline the currently decoded field

This commit is contained in:
Přemysl Eric Janouch 2017-01-17 13:54:21 +01:00
parent 62a18f4b01
commit e0a5320da7
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 6 additions and 1 deletions

7
hex.c
View File

@ -378,9 +378,14 @@ app_make_row (struct row_buffer *buf, int64_t addr, int attrs)
} }
else 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]; uint8_t cell = g_ctx.data[cell_addr - g_ctx.data_offset];
char *hex = xstrdup_printf ("%02x", cell); char *hex = xstrdup_printf ("%02x", cell);
row_buffer_append (buf, hex, attrs); row_buffer_append (buf, hex, cell_attrs);
free (hex); free (hex);
str_append_c (&ascii, (cell >= 32 && cell < 127) ? cell : '.'); str_append_c (&ascii, (cell >= 32 && cell < 127) ? cell : '.');