summaryrefslogtreecommitdiffstats
path: root/pager.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-20 12:05:39 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-20 12:05:39 +0000
commit62ff4711d9c1685f3bef32c57a544b6b6b336aca (patch)
treef3ebce145ba6bff989467f3874fbb4dd7c471aa4 /pager.c
parentd4bc4e3d0ce48671c64b71e71cab878d339e0b34 (diff)
Byrial Jensen's bold-underline patch.
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c7
1 files changed, 3 insertions, 4 deletions
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 */