gtkhtml r9104 - trunk/gtkhtml



Author: mcrha
Date: Thu Jan 15 11:24:18 2009
New Revision: 9104
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9104&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:
   trunk/gtkhtml/ChangeLog
   trunk/gtkhtml/htmlengine.c

Modified: trunk/gtkhtml/htmlengine.c
==============================================================================
--- trunk/gtkhtml/htmlengine.c	(original)
+++ trunk/gtkhtml/htmlengine.c	Thu Jan 15 11:24:18 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]