Use inverse instead of fat for hex byte output because not all terminals support fat off

This commit is contained in:
2018-11-16 15:26:33 +01:00
parent d1d65344af
commit 9ef1653e73

View File

@ -338,7 +338,7 @@ StreamBuffer StreamBuffer::expand(ssize_t start, ssize_t length) const
{ {
c = buffer[i]; c = buffer[i];
if (c < 0x20 || c >= 0x7f) if (c < 0x20 || c >= 0x7f)
result.print("\033[1m<%02x>\033[22m", c & 0xff); result.print("\033[7m<%02x>\033[27m", c & 0xff);
else else
result.append(c); result.append(c);
} }
@ -358,7 +358,7 @@ dump() const
c = buffer[i]; c = buffer[i];
if (offs && i == offs) result.append("\033[0m"); if (offs && i == offs) result.append("\033[0m");
if (c < 0x20 || c >= 0x7f) if (c < 0x20 || c >= 0x7f)
result.print("\033[1m<%02x>\033[22m", c & 0xff); result.print("\033[7m<%02x>\033[27m", c & 0xff);
else else
result.append(c); result.append(c);
if (i == offs+len-1) result.append("\033[47m"); if (i == offs+len-1) result.append("\033[47m");