[PATCH 07/10] Avoid underlining active text areas.

[email protected] Wed, 13 May 2009 00:01:54 -0400
Newsgroups gmane.comp.web.links
Message-ID <[email protected]>
They already have underscores, so underlining them is redundant (and looks a
bit strange).
---
 src/viewer/text/link.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/viewer/text/link.c b/src/viewer/text/link.c
index 7cf3455..3b12c33 100644
--- a/src/viewer/text/link.c
+++ b/src/viewer/text/link.c
@@ -180,7 +180,8 @@ init_link_drawing(struct document_view *doc_view, struct link *link, int invert,
 	color_flags = (doc_opts->color_flags | COLOR_DECREASE_LIGHTNESS);
 	color_mode = doc_opts->color_mode;
 
-	if (doc_opts->active_link.underline)
+	/* avoid underlining text input areas which has underscores */
+	if (doc_opts->active_link.underline && link->type != LINK_FIELD)
 		template.attr |= SCREEN_ATTR_UNDERLINE;
 
 	/* keep forms in bold */
-- 
1.6.3