From 04eb5ffa37b0377e5faffe654855d4a8738fc34e Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Fri, 6 Jan 2006 17:09:22 +0000 Subject: [PATCH] 2006-01-06 [colin] 1.9.100cvs125 * src/compose.c Just make completely sure we don't insert "manual line breaks" when wrapping... --- ChangeLog | 6 ++++++ PATCHSETS | 1 + configure.ac | 2 +- src/compose.c | 17 ++++++++++++----- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index af1c2e3f0..158b356d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-06 [colin] 1.9.100cvs125 + + * src/compose.c + Just make completely sure we don't insert "manual line breaks" + when wrapping... + 2006-01-04 [paul] * 2.0.0-rc3 released diff --git a/PATCHSETS b/PATCHSETS index eda147122..4bd8418a8 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1108,3 +1108,4 @@ ( cvs diff -u -r 1.654.2.1151 -r 1.654.2.1152 configure.ac; ) > 1.9.100cvs122.patchset ( cvs diff -u -r 1.1.2.29 -r 1.1.2.30 src/plugins/pgpmime/pgpmime.c; ) > 1.9.100cvs123.patchset ( cvs diff -u -r 1.207.2.79 -r 1.207.2.80 src/folderview.c; ) > 1.9.100cvs124.patchset +( cvs diff -u -r 1.382.2.213 -r 1.382.2.214 src/compose.c; ) > 1.9.100cvs125.patchset diff --git a/configure.ac b/configure.ac index abd8100e8..90836d633 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=100 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=124 +EXTRA_VERSION=125 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c index cb30d6866..9850ab019 100644 --- a/src/compose.c +++ b/src/compose.c @@ -3254,6 +3254,7 @@ static gboolean compose_join_next_line(Compose *compose, g_warning("alloc error scanning URIs\n"); \ } +static gboolean automatic_break = FALSE; static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter, gboolean force) { GtkTextView *text = GTK_TEXT_VIEW(compose->text); @@ -3364,11 +3365,15 @@ static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter, quote_len)) { GtkTextIter prev, next, cur; - if (prev_autowrap != FALSE || force) + if (prev_autowrap != FALSE || force) { + automatic_break = TRUE; gtk_text_buffer_insert(buffer, &break_pos, "\n", 1); - else if (quote_str && wrap_quote) + automatic_break = FALSE; + } else if (quote_str && wrap_quote) { + automatic_break = TRUE; gtk_text_buffer_insert(buffer, &break_pos, "\n", 1); - else + automatic_break = FALSE; + } else goto colorize; /* remove trailing spaces */ cur = break_pos; @@ -8132,11 +8137,13 @@ static void text_inserted(GtkTextBuffer *buffer, GtkTextIter *iter, gtk_text_buffer_get_iter_at_mark(buffer, iter, mark); gtk_text_buffer_place_cursor(buffer, iter); } else { - if (strcmp(text, "\n")) + if (strcmp(text, "\n") || automatic_break) gtk_text_buffer_insert(buffer, iter, text, len); - else + else { + debug_print("insert nowrap \\n\n"); gtk_text_buffer_insert_with_tags_by_name(buffer, iter, text, len, "no_join", NULL); + } } mark = gtk_text_buffer_create_mark(buffer, NULL, iter, FALSE); -- 2.25.1