[evolution-patches] patch about gtkhtml, fix #70087



Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2062
diff -u -p -r1.2062 ChangeLog
--- ChangeLog	6 Dec 2004 16:41:35 -0000	1.2062
+++ ChangeLog	14 Dec 2004 07:08:00 -0000
@@ -1,3 +1,9 @@
+2004-12-14  Mengjie Yu  <meng-jie yu sun com>
+
+	* htmltext.c: (html_text_get_slave_at_offset):
+	fix #70087 fixes the wrong behaviour when offset is at the end
+		   of non-last line of a paragraph
+
 2004-09-29  Radek Doulik  <rodo ximian com>
 
 	* gtkhtml.c (drag_data_received): call gdk_window_get_pointer so
Index: htmltext.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltext.c,v
retrieving revision 1.269
diff -u -p -r1.269 htmltext.c
--- htmltext.c	29 Nov 2004 15:53:09 -0000	1.269
+++ htmltext.c	14 Dec 2004 07:08:33 -0000
@@ -2914,8 +2914,7 @@ html_text_get_slave_at_offset (HTMLObjec
 
 	while (o && HTML_IS_TEXT_SLAVE (o)) {
 		if (HTML_IS_TEXT_SLAVE (o) && HTML_TEXT_SLAVE (o)->posStart <= offset
-		    && (offset < HTML_TEXT_SLAVE (o)->posStart + HTML_TEXT_SLAVE (o)->posLen
-			|| (offset == HTML_TEXT_SLAVE (o)->posStart + HTML_TEXT_SLAVE (o)->posLen && HTML_TEXT_SLAVE (o)->owner->text_len == offset)))
+		    && (offset <= HTML_TEXT_SLAVE (o)->posStart + HTML_TEXT_SLAVE (o)->posLen))
 			return HTML_TEXT_SLAVE (o);
 		o = o->next;
 	}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]