]> Pileus Git - ~andy/gtk/commitdiff
ri Oct 22 13:25:25 2004 Owen Taylor <otaylor@redhat.com>
authorOwen Taylor <otaylor@src.gnome.org>
Fri, 22 Oct 2004 17:30:43 +0000 (17:30 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 22 Oct 2004 17:30:43 +0000 (17:30 +0000)
        * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Fix
        backspacing on the empty last line of a buffer
        (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136840,
        Dan Williams)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextbuffer.c

index a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac..3fee684f419a37beb0fe42fa53bd7286bd6e8052 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Oct 22 13:25:25 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Fix 
+       backspacing on the empty last line of a buffer 
+       (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136840,
+       Dan Williams)
+
 2004-10-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c: Document how to use info with text/image 
index a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac..3fee684f419a37beb0fe42fa53bd7286bd6e8052 100644 (file)
@@ -1,3 +1,10 @@
+Fri Oct 22 13:25:25 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Fix 
+       backspacing on the empty last line of a buffer 
+       (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136840,
+       Dan Williams)
+
 2004-10-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c: Document how to use info with text/image 
index a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac..3fee684f419a37beb0fe42fa53bd7286bd6e8052 100644 (file)
@@ -1,3 +1,10 @@
+Fri Oct 22 13:25:25 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Fix 
+       backspacing on the empty last line of a buffer 
+       (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136840,
+       Dan Williams)
+
 2004-10-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c: Document how to use info with text/image 
index a8bbe98bbd1f4171d40c4fb4a4aca056acf8feac..3fee684f419a37beb0fe42fa53bd7286bd6e8052 100644 (file)
@@ -1,3 +1,10 @@
+Fri Oct 22 13:25:25 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Fix 
+       backspacing on the empty last line of a buffer 
+       (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136840,
+       Dan Williams)
+
 2004-10-22  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkdnd.c: Document how to use info with text/image 
index 814cf8057d88f67207b63f6940efa852360e5ec6..8d822ad356e6b2c92233c82f9b084d265fd04593 100644 (file)
@@ -3423,8 +3423,17 @@ gtk_text_buffer_backspace (GtkTextBuffer *buffer,
   end = *iter;
 
   attrs = _gtk_text_buffer_get_line_log_attrs (buffer, &start, NULL);
-  offset = gtk_text_iter_get_line_offset (&start);
-  backspace_deletes_character = attrs[offset].backspace_deletes_character;
+
+  /* For no good reason, attrs is NULL for the empty last line in
+   * a buffer. Special case that here. (#156164)
+   */
+  if (attrs)
+    {
+      offset = gtk_text_iter_get_line_offset (&start);
+      backspace_deletes_character = attrs[offset].backspace_deletes_character;
+    }
+  else
+    backspace_deletes_character = FALSE;
 
   gtk_text_iter_backward_cursor_position (&start);