gtkhtml r9105 - branches/gnome-2-24/gtkhtml



Author: mcrha
Date: Thu Jan 15 11:24:35 2009
New Revision: 9105
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9105&view=rev

Log:
2009-01-15  Milan Crha  <mcrha redhat com>

	** Fix for bug #565491

	* htmlengine.c (insert_text): Preserve leading space only
	when in the editing mode, otherwise strip it as before.



Modified:
   branches/gnome-2-24/gtkhtml/ChangeLog
   branches/gnome-2-24/gtkhtml/htmlengine.c

Modified: branches/gnome-2-24/gtkhtml/htmlengine.c
==============================================================================
--- branches/gnome-2-24/gtkhtml/htmlengine.c	(original)
+++ branches/gnome-2-24/gtkhtml/htmlengine.c	Thu Jan 15 11:24:35 2009
@@ -941,14 +941,14 @@
 	            if (' ' == (HTML_TEXT (prev)->text)[HTML_TEXT (prev)->text_bytes - 1])
 	                prev_text_ends_in_space = TRUE ;
 
-	if (e->flow == NULL) {
+	if (e->flow == NULL && e->editable) {
 		/* Preserve one leading space. */
 		if (*text == ' ') {
 			while (*text == ' ')
 				text++;
 			text--;
 		}
-	} else if ((prev == NULL || prev_text_ends_in_space) && !e->inPre) {
+	} else if ((e->flow == NULL && !e->editable) || ((prev == NULL || prev_text_ends_in_space) && !e->inPre)) {
 		while (*text == ' ')
 			text++;
 		if (*text == 0)



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