From 92c9b86374d75dc43b9b249f0a970b3620ecc394 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Mon, 26 Dec 2005 11:43:18 +0000 Subject: [PATCH] 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. --- src/document/plain/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document/plain/renderer.c b/src/document/plain/renderer.c index c54e6c08a..cdbad84ff 100644 --- a/src/document/plain/renderer.c +++ b/src/document/plain/renderer.c @@ -325,7 +325,7 @@ add_document_line(struct plain_renderer *renderer, continue; } - if (expanded - 2 >= 0) { + if ((expanded + line_pos) - 2 >= 0) { /* Don't count the backspace character or the * deleted character when returning the line's * width or when expanding tabs. */