[evolution] EHTMLEditorView - Avoid unnecessary g_utf8_strlen call



commit 9181bcef9c184e0ad923489d9c7b9ad5ef0df13a
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Mar 6 09:36:45 2015 +0100

    EHTMLEditorView - Avoid unnecessary g_utf8_strlen call

 e-util/e-html-editor-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index a7e07e4..25f3512 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -2010,7 +2010,7 @@ body_input_event_cb (WebKitDOMElement *element,
        /* If text before caret includes UNICODE_ZERO_WIDTH_SPACE character, remove it */
        if (WEBKIT_DOM_IS_TEXT (node)) {
                gchar *text = webkit_dom_character_data_get_data (WEBKIT_DOM_CHARACTER_DATA (node));
-               glong length = g_utf8_strlen (text, -1);
+               glong length = webkit_dom_character_data_get_length (WEBKIT_DOM_CHARACTER_DATA (node));
                WebKitDOMNode *parent;
 
                /* We have to preserve empty paragraphs with just UNICODE_ZERO_WIDTH_SPACE


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