[evolution/webkit-composer: 195/210] Remove all BR elements when rewrapping lines.



commit 0c439efac5fc8134ca39b735dc24774401c7342f
Author: Tomas Popela <tpopela redhat com>
Date:   Mon Jun 3 16:04:15 2013 +0200

    Remove all BR elements when rewrapping lines.
    
    Fixes messed-up for cycle. Also removes bracket from ternary operator.

 e-util/e-editor-selection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index f9ec0c8..8ade0b2 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -2449,12 +2449,12 @@ wrap_lines (EEditorSelection *selection,
         * from Format->Wrap Lines action */
        wrap_br = webkit_dom_document_fragment_query_selector_all (
                        fragment,
-                       (remove_all_br) ? "br" : "br.-x-evo-wrap-br",
+                       remove_all_br ? "br" : "br.-x-evo-wrap-br",
                        NULL);
 
        /* And remove them */
        br_count = webkit_dom_node_list_get_length (wrap_br);
-       for (ii = br_count; ii > 0; ii--) {
+       for (ii = br_count - 1; ii >= 0; ii--) {
                WebKitDOMNode *br = webkit_dom_node_list_item (wrap_br, ii);
                webkit_dom_node_remove_child (
                                webkit_dom_node_get_parent_node (br), br, NULL);


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