BFU: Fix cell count for forcibly wrapped lines.

To reproduce before this patch:
- Run ELinks with an 80x25 terminal.
- Set document.browse.forms.confirm_submit = 1.
- Go to <http://bugzilla.elinks.cz/query.cgi>.
- Click the [ Search ] submit button.
- ELinks asks "Do you want to post form data to URL".
  Each line of the URL begins at the horizontal center of the dialog,
  and bleeds outside the right border of the dialog.  Also, the
  [ Yes ] and [ No ] buttons appear to float below the dialog.

---
commit f9ecbc7636e9e864a55e1bf5cd992b4e2a31cc43
tree d5c83310e56bcfa55e82c70608c63fb88d5c2cdf
parent 3b469fe366f6b552347c5d3c4e0d9f976a84e670
author Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Tue, 01 Aug 2006 20:55:02 +0300
committer Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Tue, 01 Aug 2006 20:55:02 +0300

 src/bfu/text.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/bfu/text.c b/src/bfu/text.c
index 9156e55..8835ea0 100644
--- a/src/bfu/text.c
+++ b/src/bfu/text.c
@@ -94,10 +94,14 @@ #ifdef CONFIG_UTF_8
 								       max_width,
 								       NULL);
 					split = &text[m_bytes];
+					cells_save = utf8_ptr2cells(text,
+								    split);
 				} else
 #endif /* CONFIG_UTF_8 */
+				{
 					split = &text[max_width];
-
+					cells_save = max_width;
+				}
 
 				/* FIXME: Function ispunct won't work correctly
 				 * with UTF-8 characters. We need some similar

Attachment: pgpfsOEnsAS0d.pgp
Description: PGP signature

_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to