diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-01-17 13:54:21 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-01-17 13:54:21 +0100 |
commit | e0a5320da701061ffac43c41355545d63ceb8337 (patch) | |
tree | fe42822777439986d444d3aa805568a4a78047f2 | |
parent | 62a18f4b017f68b5be0316988726a2ddd1ac0268 (diff) | |
download | hex-e0a5320da701061ffac43c41355545d63ceb8337.tar.gz hex-e0a5320da701061ffac43c41355545d63ceb8337.tar.xz hex-e0a5320da701061ffac43c41355545d63ceb8337.zip |
Underline the currently decoded field
-rw-r--r-- | hex.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 : '.'); |