diff options
author | pgen <p.gen.progs@gmail.com> | 2016-12-12 00:11:45 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2016-12-12 00:11:45 +0100 |
commit | 37417951db5d152a548abd767b495ce236a237ac (patch) | |
tree | 574f2378b65e5e8b751fe6f5cb64519aeb7d2168 | |
parent | e3adab5414ec6dfdf4d27b6f9e7d496e16d67aa0 (diff) |
Fix the display of tagged words when the 'cursor_on_tag' attribute is not set
-rw-r--r-- | smenu.c | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -3548,13 +3548,34 @@ disp_word(word_t * word_a, int pos, int search_mode, char * buffer, { /* If we are not in search mode, display a normal cursor */ /* """"""""""""""""""""""""""""""""""""""""""""""""""""" */ - if (win->cursor_attr.is_set) + if (win->cursor_attr.is_set && win->cursor_on_tag_attr.is_set) { if (word_a[pos].is_tagged) apply_txt_attr(term, win->cursor_on_tag_attr); else apply_txt_attr(term, win->cursor_attr); } + else if (win->cursor_attr.is_set) + { + apply_txt_attr(term, win->cursor_attr); + if (word_a[pos].is_tagged) + { + if (term->has_underline) + (void)tputs(enter_underline_mode, 1, outch); + } + } + else if (win->cursor_on_tag_attr.is_set) + { + if (word_a[pos].is_tagged) + apply_txt_attr(term, win->cursor_on_tag_attr); + else + { + if (term->has_reverse) + (void)tputs(enter_reverse_mode, 1, outch); + else if (term->has_standout) + (void)tputs(enter_standout_mode, 1, outch); + } + } else { if (word_a[pos].is_tagged) |