diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-20 12:05:39 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-20 12:05:39 +0000 |
commit | 62ff4711d9c1685f3bef32c57a544b6b6b336aca (patch) | |
tree | f3ebce145ba6bff989467f3874fbb4dd7c471aa4 | |
parent | d4bc4e3d0ce48671c64b71e71cab878d339e0b34 (diff) |
Byrial Jensen's bold-underline patch.
-rw-r--r-- | pager.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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 */ |