[evolution/wip/webkit-composer: 766/966] Force spellcheck when switch to plain text mode in composer



commit 6e53a3a71506b2fc55236422f856e22dae7578a6
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Oct 11 14:43:24 2013 +0200

    Force spellcheck when switch to plain text mode in composer

 composer/e-composer-private.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index e951308..b5fe38f 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -821,7 +821,12 @@ composer_move_caret (EMsgComposer *composer)
        element = webkit_dom_document_get_element_by_id (document, "-x-evo-caret-position");
        /* Caret position found => composer mode changed */
        if (element) {
-               e_editor_selection_restore_caret_position (e_editor_widget_get_selection (editor_widget));
+               e_editor_selection_restore_caret_position (editor_selection);
+               /* We want to force spellcheck just in case that we switched to plain
+                * text mode (when switching to html mode, the underlined words are
+                * preserved */
+               if (!e_editor_widget_get_html_mode (editor_widget))
+                       e_editor_widget_force_spellcheck (editor_widget);
                return;
        }
 


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