UTF-8: Fix scrolling of input fields.
commit8d77387f6f3d5ba10168b277b9d32c020439bdcc
authorKalle Olavi Niemitalo <kon@iki.fi>
Sun, 27 Aug 2006 20:41:41 +0000 (27 23:41 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Sat, 2 Sep 2006 20:03:45 +0000 (2 23:03 +0300)
tree5192506edf901cffa5ed64b90aca2bd57f9835b6
parent92845d0b56620bcb232250492a61e82aa64e3c88
UTF-8: Fix scrolling of input fields.

form_state.state_cell is no longer used for FC_TEXT, FC_PASSWORD, nor FC_FILE.
Instead, get_link_cursor_offset() computes the cell with utf8_ptr2chars
(a new function) or utf8_ptr2cells.  This shouldn't slow down ELinks too
much, as it's done only for the selected link and only once per redraw.

The left side of a scrolled input field is always aligned at a
character boundary.  The right side might not be.
src/viewer/text/form.c
src/viewer/text/form.h
src/viewer/text/link.c