[evolution/wip/webkit-composer: 698/966] Bug 689799 - [webkit-composer] Wrap Lines doesn't wrap
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 698/966] Bug 689799 - [webkit-composer] Wrap Lines doesn't wrap
- Date: Wed, 23 Apr 2014 10:52:06 +0000 (UTC)
commit 28df93f6e4a3e6e2ae7c12f24451895ddc4e3c7d
Author: Tomas Popela <tpopela redhat com>
Date: Tue Apr 23 13:37:31 2013 +0200
Bug 689799 - [webkit-composer] Wrap Lines doesn't wrap
e-util/e-editor-selection.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index c7467e7..e68e1b7 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -2286,15 +2286,16 @@ e_editor_selection_wrap_lines (EEditorSelection *selection)
web_view = WEBKIT_WEB_VIEW (editor_widget);
+ /* When there is nothing selected, we select the whole document */
+ if (g_strcmp0 (e_editor_selection_get_string (selection), "") == 0) {
+ EEditorWidgetCommand command;
+ command = E_EDITOR_WIDGET_COMMAND_SELECT_ALL;
+ e_editor_widget_exec_command (editor_widget, command, NULL);
+ }
+
document = webkit_web_view_get_dom_document (web_view);
range = editor_selection_get_current_range (selection);
- /* Extend the range to include entire nodes */
- webkit_dom_range_select_node_contents (
- range,
- webkit_dom_range_get_common_ancestor_container (range, NULL),
- NULL);
-
/* Copy the selection from DOM, wrap the lines and then paste it back
* using the DOM command which will overwrite the selection, and
* record it as an undoable action */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]