[evolution/webkit-composer] Swap the directions of caret movement on restoring the caret position.



commit 6be3ede60c03e2931a54a20f961f157d5f0f3dff
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Sep 25 14:11:14 2013 +0200

    Swap the directions of caret movement on restoring the caret position.
    
    When writing some text into composer this was causing that the caret was
    not on a position where was expected.

 e-util/e-editor-selection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index 89ff327..5342bf9 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -3048,8 +3048,8 @@ e_editor_selection_restore_caret_position (EEditorSelection *selection)
                                /* FIXME If caret position is restored and afterwards the position is saved
                                 * it is not on the place where it supposed to be (it is in the beginning of
                                 * parent's element. It can be avoided by moving with the caret. */
-                               webkit_dom_dom_selection_modify (window_selection, "move", "right", 
"character");
                                webkit_dom_dom_selection_modify (window_selection, "move", "left", 
"character");
+                               webkit_dom_dom_selection_modify (window_selection, "move", "right", 
"character");
 
                                return;
                        }
@@ -3064,8 +3064,8 @@ e_editor_selection_restore_caret_position (EEditorSelection *selection)
                /* FIXME If caret position is restored and afterwards the position is saved
                 * it is not on the place where it supposed to be (it is in the beginning of
                 * parent's element. It can be avoided by moving with the caret. */
-               webkit_dom_dom_selection_modify (window_selection, "move", "right", "character");
                webkit_dom_dom_selection_modify (window_selection, "move", "left", "character");
+               webkit_dom_dom_selection_modify (window_selection, "move", "right", "character");
        }
 }
 


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