From 994afb6ebab54973b9a7bf1e1a3fed789703c126 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 30 May 2020 23:23:48 -0700 Subject: 6449 - italics We're not going to render italics since they still feel like an advanced feature for terminals, and different terminals have different escape sequences for them, and since they often look weird to my eyes on the monospace font of a terminal window. So underscores and italics will both be bold. --- apps/browse.mu | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'apps') diff --git a/apps/browse.mu b/apps/browse.mu index ab08b232..f442d2a4 100644 --- a/apps/browse.mu +++ b/apps/browse.mu @@ -100,6 +100,15 @@ $update-attributes:check-state: { # r->current-state == 0 && c == '*' start-bold copy-to *state, 1 + break $update-attributes:check-state + } + compare c, 0x5f # '_' + { + break-if-!= + # r->current-state == 0 && c == '_' + start-bold + copy-to *state, 1 + break $update-attributes:check-state } break $update-attributes:check-state } @@ -111,7 +120,17 @@ $update-attributes:check-state: { # r->current-state == 1 && c == '*' reset-formatting copy-to *state, 0 + break $update-attributes:check-state } + compare c, 0x5f # '_' + { + break-if-!= + # r->current-state == 1 && c == '_' + reset-formatting + copy-to *state, 0 + break $update-attributes:check-state + } + break $update-attributes:check-state } } } -- cgit 1.4.1-2-gfad0