[evolution/webkit-composer: 194/231] Remove all BR elements when rewrapping lines.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 194/231] Remove all BR elements when rewrapping lines.
- Date: Fri, 13 Sep 2013 14:22:17 +0000 (UTC)
commit 7cbe823b391223726a99e1a73ac55c1ce2883435
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]