From 62ff4711d9c1685f3bef32c57a544b6b6b336aca Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Sun, 20 Sep 1998 12:05:39 +0000 Subject: Byrial Jensen's bold-underline patch. --- pager.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'pager.c') diff --git a/pager.c b/pager.c index 3f4af05f..58837901 100644 --- a/pager.c +++ b/pager.c @@ -1112,24 +1112,23 @@ display_line (FILE *f, long *last_pos, struct line_t **lineInfo, int n, { if (buf[ch+2] == c) { - special = A_BOLD; - last_special = 1; + special = (c == '_' && last_special == A_UNDERLINE) + ? A_UNDERLINE : A_BOLD; ch += 2; } else if (buf[ch] == '_' || buf[ch+2] == '_') { special = A_UNDERLINE; - last_special = 1; ch += 2; c = (buf[ch] == '_') ? buf[ch-2] : buf[ch]; } else { special = 0; /* overstrike: nothing to do! */ - last_special = 0; ch += 2; c = buf[ch]; } + last_special = special; } /* Handle ANSI sequences */ -- cgit v1.2.3