Author: phlamethrower
Date: Sun Sep 10 21:25:20 2006
New Revision: 2947
URL:
http://svn.semichrome.net?rev=2947&view=rev
Log:
Fix wordwrap+horizontal scroll in textareas
Modified:
trunk/netsurf/desktop/textinput.c
Modified: trunk/netsurf/desktop/textinput.c
URL:
http://svn.semichrome.net/trunk/netsurf/desktop/textinput.c?rev=2947&...
==============================================================================
--- trunk/netsurf/desktop/textinput.c (original)
+++ trunk/netsurf/desktop/textinput.c Sun Sep 10 21:25:20 2006
@@ -656,6 +656,9 @@
text_box = text_box->next;
assert(text_box);
assert(char_offset <= text_box->length);
+ /* Scroll back to the left */
+ box_x += textarea->scroll_x;
+ textarea->scroll_x = 0;
}
else
char_offset = text_box->length + text_box->space;
@@ -1934,7 +1937,7 @@
scrolly = textarea->scroll_y;
assert(textarea->gadget);
/* Calculate the caret coordinates */
- cx = textarea->gadget->caret_pixel_offset;
+ cx =
textarea->gadget->caret_pixel_offset+textarea->gadget->caret_text_box->x;
cy = textarea->gadget->caret_text_box->y;
/* Ensure they are visible */
if (!box_hscrollbar_present(textarea))