[evolution/wip/webkit-composer: 260/372] Remove all BR elements when rewrapping lines.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 260/372] Remove all BR elements when rewrapping lines.
- Date: Thu, 6 Feb 2014 11:45:22 +0000 (UTC)
commit 77f7eba3258fe229877371464d57ec67feeefc17
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]