Draw underline on anchor which contains cboth text and images.
This commit is contained in:
committed by
Tatsuya Kinoshita
parent
09ececc3b7
commit
1eabd79f5b
13
display.c
13
display.c
@@ -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)
|
||||
|
Reference in New Issue
Block a user