[gimp] app: argh forgot one more place



commit 8a1a19fc3248f89218c434c37afa9b1fb533a3de
Author: Michael Natterer <mitch gimp org>
Date:   Mon Mar 1 21:39:26 2010 +0100

    app: argh forgot one more place
    
    Time for a refactoring that pulls the forgotten code into one common
    place.

 app/tools/gimptexttool-editor.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index e5c90c7..4a4737a 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -420,10 +420,13 @@ gimp_text_tool_editor_motion (GimpTextTool *text_tool,
     }
   else
     {
-      if (cursor_index != index)
+      gimp_text_buffer_get_iter_at_index (text_tool->buffer, &cursor,
+                                          index, TRUE);
+      if (trailing)
         {
-          gimp_text_buffer_get_iter_at_index (text_tool->buffer, &cursor,
-                                              index, TRUE);
+          gtk_text_iter_forward_char (&cursor);
+          index = gimp_text_buffer_get_iter_index (text_tool->buffer,
+                                                   &cursor, TRUE);
         }
     }
 



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