nautilus r15073 - trunk/eel



Author: alexl
Date: Mon Mar  9 11:36:54 2009
New Revision: 15073
URL: http://svn.gnome.org/viewvc/nautilus?rev=15073&view=rev

Log:
2009-03-09  Alexander Larsson  <alexl redhat com>

        * eel-editable-label.c:
	(eel_editable_label_move_forward_word):
	Don't move past end of string (#569165).



Modified:
   trunk/eel/ChangeLog
   trunk/eel/eel-editable-label.c

Modified: trunk/eel/eel-editable-label.c
==============================================================================
--- trunk/eel/eel-editable-label.c	(original)
+++ trunk/eel/eel-editable-label.c	Mon Mar  9 11:36:54 2009
@@ -2756,10 +2756,11 @@
       eel_editable_label_ensure_layout (label, FALSE);
       
       pango_layout_get_log_attrs (label->layout, &log_attrs, &n_attrs);
-      
-      /* Find the next word end */
+
+      /* Find the next word end,
+	 (remember, n_attrs is one more than the number of of chars) */
       new_pos++;
-      while (new_pos < n_attrs && !log_attrs[new_pos].is_word_end)
+      while (new_pos < (n_attrs - 1) && !log_attrs[new_pos].is_word_end)
 	new_pos++;
 
       g_free (log_attrs);



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