2008-04-30 [colin] 3.4.0cvs17
authorColin Leroy <colin@colino.net>
Wed, 30 Apr 2008 06:42:30 +0000 (06:42 +0000)
committerColin Leroy <colin@colino.net>
Wed, 30 Apr 2008 06:42:30 +0000 (06:42 +0000)
* src/compose.c
Fix 'Delete line' and 'Delete to end of line'
on the last line. Patch by <seelenhirt@gmx.net>

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index bf1030e..a00f3fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-30 [colin]     3.4.0cvs17
+
+       * src/compose.c
+               Fix 'Delete line' and 'Delete to end of line'
+               on the last line. Patch by <seelenhirt@gmx.net>
+
 2008-04-28 [colin]     3.4.0cvs16
 
        * src/folder.c
index 561ec19..e844548 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.9.2.14 -r 1.9.2.15 src/addrindex.h;  cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/common/ssl.c;  cvs diff -u -r 1.4.2.26 -r 1.4.2.27 src/common/ssl_certificate.c;  ) > 3.4.0cvs14.patchset
 ( cvs diff -u -r 1.9.2.27 -r 1.9.2.28 src/common/ssl.c;  ) > 3.4.0cvs15.patchset
 ( cvs diff -u -r 1.213.2.181 -r 1.213.2.182 src/folder.c;  cvs diff -u -r 1.36.2.137 -r 1.36.2.138 src/common/utils.c;  ) > 3.4.0cvs16.patchset
+( cvs diff -u -r 1.382.2.444 -r 1.382.2.445 src/compose.c;  ) > 3.4.0cvs17.patchset
index c610ba2..1ab7ca7 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=16
+EXTRA_VERSION=17
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1194db0..d567488 100644 (file)
@@ -9590,7 +9590,6 @@ static void textview_delete_line (GtkTextView *text)
        GtkTextBuffer *buffer;
        GtkTextMark *mark;
        GtkTextIter ins, start_iter, end_iter;
-       gboolean found;
 
        g_return_if_fail(GTK_IS_TEXT_VIEW(text));
 
@@ -9602,13 +9601,13 @@ static void textview_delete_line (GtkTextView *text)
        gtk_text_iter_set_line_offset(&start_iter, 0);
 
        end_iter = ins;
-       if (gtk_text_iter_ends_line(&end_iter))
-               found = gtk_text_iter_forward_char(&end_iter);
-       else
-               found = gtk_text_iter_forward_to_line_end(&end_iter);
-
-       if (found)
-               gtk_text_buffer_delete(buffer, &start_iter, &end_iter);
+       if (gtk_text_iter_ends_line(&end_iter)){
+               if (!gtk_text_iter_forward_char(&end_iter))
+                       gtk_text_iter_backward_char(&start_iter);
+       }
+       else 
+               gtk_text_iter_forward_to_line_end(&end_iter);
+       gtk_text_buffer_delete(buffer, &start_iter, &end_iter);
 }
 
 static void textview_delete_to_line_end (GtkTextView *text)
@@ -9616,7 +9615,6 @@ static void textview_delete_to_line_end (GtkTextView *text)
        GtkTextBuffer *buffer;
        GtkTextMark *mark;
        GtkTextIter ins, end_iter;
-       gboolean found;
 
        g_return_if_fail(GTK_IS_TEXT_VIEW(text));
 
@@ -9625,11 +9623,10 @@ static void textview_delete_to_line_end (GtkTextView *text)
        gtk_text_buffer_get_iter_at_mark(buffer, &ins, mark);
        end_iter = ins;
        if (gtk_text_iter_ends_line(&end_iter))
-               found = gtk_text_iter_forward_char(&end_iter);
+               gtk_text_iter_forward_char(&end_iter);
        else
-               found = gtk_text_iter_forward_to_line_end(&end_iter);
-       if (found)
-               gtk_text_buffer_delete(buffer, &ins, &end_iter);
+               gtk_text_iter_forward_to_line_end(&end_iter);
+       gtk_text_buffer_delete(buffer, &ins, &end_iter);
 }
 
 static void compose_advanced_action_cb(Compose *compose,