[Commits] [SCM] claws branch, master, updated. 3.15.0-5-g1acb353

ticho at claws-mail.org ticho at claws-mail.org
Thu Mar 30 01:09:31 CEST 2017


The branch, master has been updated
       via  1acb353987cb2a45b6b6802cc48db6f66aac3121 (commit)
      from  e6db5f2b301576156a8d56fb48b81ac9bffd0398 (commit)

Summary of changes:
 src/textview.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 1acb353987cb2a45b6b6802cc48db6f66aac3121
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Mar 30 01:04:22 2017 +0200

    Fix the other off-by-one bug in textview quoting.
    
    There were two complementary off-by-one bugs, each masking
    the other one. Commit 8819fe fixed the first one, thus
    unmasking this one.
    
    This should also fix the disgusting bug #3797:
    "Unfold quoting renders quotes completely confusing".

diff --git a/src/textview.c b/src/textview.c
index 1ecaebc..3b4ff2b 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1664,7 +1664,7 @@ do_quote:
 					(buffer, &iter, " [...]", -1,
 					 "qlink", fg_color, NULL);
 			uri->end = gtk_text_iter_get_offset(&iter);
-			gtk_text_buffer_insert(buffer, &iter, "  \n", -1);
+			gtk_text_buffer_insert(buffer, &iter, "\n", -1);
 			
 			uri->filename = NULL;
 			textview->uri_list =
@@ -2701,7 +2701,7 @@ static void textview_toggle_quote(TextView *textview, GSList *start_list, Clicka
 		gtk_text_buffer_get_iter_at_offset(buffer, &start, uri->start);
 		gtk_text_buffer_get_iter_at_offset(buffer, &end,   uri->end);
 		textview_shift_uris_after(textview, start_list, uri->start, 
-			g_utf8_strlen((gchar *)uri->data, -1)-strlen(" [...]\n"));
+			g_utf8_strlen((gchar *)uri->data, -1)-strlen(" [...]"));
 		gtk_text_buffer_delete(buffer, &start, &end);
 		gtk_text_buffer_get_iter_at_offset(buffer, &start, uri->start);
 		gtk_text_buffer_insert_with_tags_by_name
@@ -2717,7 +2717,7 @@ static void textview_toggle_quote(TextView *textview, GSList *start_list, Clicka
 		gtk_text_buffer_get_iter_at_offset(buffer, &end,   uri->end);
 		textview_remove_uris_in(textview, uri->start, uri->end);
 		textview_shift_uris_after(textview, start_list, uri->start, 
-			strlen(" [...]\n")-g_utf8_strlen((gchar *)uri->data, -1));
+			strlen(" [...]")-g_utf8_strlen((gchar *)uri->data, -1));
 		gtk_text_buffer_delete(buffer, &start, &end);
 		gtk_text_buffer_get_iter_at_offset(buffer, &start, uri->start);
 		gtk_text_buffer_insert_with_tags_by_name

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list