* display.c: Draw underline on anchor text which is not overlapped with any image.
This commit is contained in:
committed by
Tatsuya Kinoshita
parent
f941b1d562
commit
0d99209d9f
11
display.c
11
display.c
@@ -521,10 +521,10 @@ drawAnchorCursor0(Buffer *buf, AnchorList *al, int hseq, int prevhseq,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (hseq >= 0 && an->hseq == hseq) {
|
if (hseq >= 0 && an->hseq == hseq) {
|
||||||
int hasImage = 0;
|
int start_pos = an->start.pos;
|
||||||
for (i = an->start.pos; i < an->end.pos; i++) {
|
for (i = an->start.pos; i < an->end.pos; i++) {
|
||||||
if (l->propBuf[i] & PE_IMAGE)
|
if (support_remote_image && (l->propBuf[i] & PE_IMAGE))
|
||||||
hasImage = 1 ;
|
start_pos = i + 1; /* Lazy check */
|
||||||
if (l->propBuf[i] & (PE_IMAGE | PE_ANCHOR | PE_FORM)) {
|
if (l->propBuf[i] & (PE_IMAGE | PE_ANCHOR | PE_FORM)) {
|
||||||
if (active)
|
if (active)
|
||||||
l->propBuf[i] |= PE_ACTIVE;
|
l->propBuf[i] |= PE_ACTIVE;
|
||||||
@@ -532,10 +532,9 @@ drawAnchorCursor0(Buffer *buf, AnchorList *al, int hseq, int prevhseq,
|
|||||||
l->propBuf[i] &= ~PE_ACTIVE;
|
l->propBuf[i] &= ~PE_ACTIVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (active &&
|
if (active && start_pos < an->end.pos)
|
||||||
(! support_remote_image || ! hasImage))
|
|
||||||
redrawLineRegion(buf, l, l->linenumber - tline + buf->rootY,
|
redrawLineRegion(buf, l, l->linenumber - tline + buf->rootY,
|
||||||
an->start.pos, an->end.pos);
|
start_pos, an->end.pos);
|
||||||
}
|
}
|
||||||
else if (prevhseq >= 0 && an->hseq == prevhseq) {
|
else if (prevhseq >= 0 && an->hseq == prevhseq) {
|
||||||
if (active)
|
if (active)
|
||||||
|
Reference in New Issue
Block a user