[evolution/webkit-composer] Move caret to right place when return is pressed.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer] Move caret to right place when return is pressed.
- Date: Fri, 12 Jul 2013 12:35:40 +0000 (UTC)
commit b88b312300e5cdf9c0504680db68b36cef8b5ccf
Author: Tomas Popela <tpopela redhat com>
Date: Fri Jul 12 14:32:48 2013 +0200
Move caret to right place when return is pressed.
e-util/e-editor-selection.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index 7e8c79c..d9409bb 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -3183,9 +3183,13 @@ e_editor_selection_wrap_lines (EEditorSelection *selection,
/* If there is less than word_wrap_length characters do nothing */
if (g_utf8_strlen (e_editor_selection_get_string (selection), -1) <
selection->priv->word_wrap_length) {
if (return_pressed) {
+ WebKitDOMNode *next_sibling =
+ webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE
(caret_position));
+
+ if (WEBKIT_DOM_IS_ELEMENT (next_sibling))
+ move_caret_into_element (document, WEBKIT_DOM_ELEMENT
(next_sibling));
+
e_editor_selection_clear_caret_position_marker (selection);
- move_caret_into_element (document, WEBKIT_DOM_ELEMENT (paragraph));
- webkit_dom_dom_selection_modify (window_selection, "move", "forward",
"character");
} else {
e_editor_selection_restore_caret_position (selection);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]