aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-07-21 20:15:28 +0800
committerTomas Popela <tpopela@redhat.com>2014-07-21 20:17:19 +0800
commit45cc08a6bef1e312a45037cb7584635e6b0c3536 (patch)
tree805f94a0f3ac406b7a46384fdfde975dc3c03e02
parentf1ffa7d2232beebcbf8f5a3ef74a09983c571f45 (diff)
downloadgsoc2013-evolution-45cc08a6bef1e312a45037cb7584635e6b0c3536.tar
gsoc2013-evolution-45cc08a6bef1e312a45037cb7584635e6b0c3536.tar.gz
gsoc2013-evolution-45cc08a6bef1e312a45037cb7584635e6b0c3536.tar.bz2
gsoc2013-evolution-45cc08a6bef1e312a45037cb7584635e6b0c3536.tar.lz
gsoc2013-evolution-45cc08a6bef1e312a45037cb7584635e6b0c3536.tar.xz
gsoc2013-evolution-45cc08a6bef1e312a45037cb7584635e6b0c3536.tar.zst
gsoc2013-evolution-45cc08a6bef1e312a45037cb7584635e6b0c3536.zip
EHTMLEditorView - When writing into the citation rewrap and requote just when it is necessary
-rw-r--r--e-util/e-html-editor-view.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 30f07af055..493fa74a60 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -738,6 +738,8 @@ body_input_event_cb (WebKitDOMElement *element,
length = word_wrap_length - 2 * citation_level;
if (element && citation_level > 0) {
+ gchar *content;
+ gint text_length;
WebKitDOMElement *block;
gboolean remove_quoting = FALSE;
@@ -762,8 +764,12 @@ body_input_event_cb (WebKitDOMElement *element,
block = webkit_dom_node_get_parent_element (
WEBKIT_DOM_NODE (block));
+ content = webkit_dom_node_get_text_content (WEBKIT_DOM_NODE (block));
+ text_length = g_utf8_strlen (content, -1);
+ g_free (content);
+
/* Wrap and quote the line */
- if (!remove_quoting) {
+ if (!remove_quoting && text_length >= word_wrap_length) {
remove_quoting_from_element (block);
block = e_html_editor_selection_wrap_paragraph_length (