1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00

In add_document_line, check expanded + line_pos rather than just

expanded when checking whether there are enough characters on the line
to decrement expanded by 2. This fixes the problem reported by fonseca
where the linked text was offset from the URI when there were backspaces
earlier on the line.
This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-26 11:43:18 +00:00 committed by Miciah Dashiel Butler Masters
parent eeb51bffea
commit 92c9b86374

View File

@ -325,7 +325,7 @@ add_document_line(struct plain_renderer *renderer,
continue; continue;
} }
if (expanded - 2 >= 0) { if ((expanded + line_pos) - 2 >= 0) {
/* Don't count the backspace character or the /* Don't count the backspace character or the
* deleted character when returning the line's * deleted character when returning the line's
* width or when expanding tabs. */ * width or when expanding tabs. */