diff options
author | Araki Ken <arakiken@users.sf.net> | 2014-09-24 11:08:54 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2014-12-06 11:47:05 +0000 |
commit | 1eabd79f5bb07addda737183d6681cadae4ebf38 (patch) | |
tree | 4c49530d9322be0fc6229932921df43ace9d6cc2 | |
parent | Remove close_tty() from setup_child() because close_tty() sometimes interrupt... (diff) | |
download | w3m-1eabd79f5bb07addda737183d6681cadae4ebf38.tar.gz w3m-1eabd79f5bb07addda737183d6681cadae4ebf38.zip |
Draw underline on anchor which contains cboth text and images.
Diffstat (limited to '')
-rw-r--r-- | display.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -522,9 +522,14 @@ drawAnchorCursor0(Buffer *buf, AnchorList *al, int hseq, int prevhseq, } if (hseq >= 0 && an->hseq == hseq) { int start_pos = an->start.pos; + int end_pos = an->end.pos; for (i = an->start.pos; i < an->end.pos; i++) { - if (enable_inline_image && (l->propBuf[i] & PE_IMAGE)) - start_pos = i + 1; /* Lazy check */ + if (enable_inline_image && (l->propBuf[i] & PE_IMAGE)) { + if (start_pos == i) + start_pos = i + 1; + else if (end_pos == an->end.pos) + end_pos = i - 1; + } if (l->propBuf[i] & (PE_IMAGE | PE_ANCHOR | PE_FORM)) { if (active) l->propBuf[i] |= PE_ACTIVE; @@ -532,9 +537,9 @@ drawAnchorCursor0(Buffer *buf, AnchorList *al, int hseq, int prevhseq, l->propBuf[i] &= ~PE_ACTIVE; } } - if (active && start_pos < an->end.pos) + if (active && start_pos < end_pos) redrawLineRegion(buf, l, l->linenumber - tline + buf->rootY, - start_pos, an->end.pos); + start_pos, end_pos); } else if (prevhseq >= 0 && an->hseq == prevhseq) { if (active) |