1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

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.
This commit is contained in:
Kalle Olavi Niemitalo 2006-08-01 20:55:02 +03:00 committed by Miciah Dashiel Butler Masters
parent cfbf7d1439
commit 44633cd757

View File

@ -94,10 +94,14 @@ split_line(unsigned char *text, int max_width, int *cells)
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