# HG changeset patch # User Sadrul Habib Chowdhury # Date 1200696033 0 # Node ID 8f78d223d24e40a584672f1b87dc2c26ab1ce476 # Parent 6e2dc21a33cb8275e2467163a66d59cf3329b28e Fix the bug where removing the typing notification would cause the text to scroll *up* by 2 pixels. I have also added a define 'RESERVE_LINE' which will always reserve a blank line at the end (of the buffer, not of the view) for the typing notification. We can switch to using that if people use it and like it better, (or hate it less ;) ) diff -r 6e2dc21a33cb -r 8f78d223d24e pidgin/gtkconv.c --- a/pidgin/gtkconv.c Fri Jan 18 15:26:59 2008 +0000 +++ b/pidgin/gtkconv.c Fri Jan 18 22:40:33 2008 +0000 @@ -3428,9 +3428,14 @@ gtk_text_buffer_delete_mark(buffer, stmark); gtk_text_buffer_delete_mark(buffer, enmark); gtk_text_buffer_delete(buffer, &start, &end); - } else if (message && *message == '\n' && !*(message + 1)) + } else if (message && *message == '\n' && message[1] == ' ' && message[2] == '\0') message = NULL; +#ifdef RESERVE_LINE + if (!message) + message = "\n "; /* The blank space is required to avoid a GTK+/Pango bug */ +#endif + if (message) { GtkTextIter iter; gtk_text_buffer_get_end_iter(buffer, &iter); @@ -3458,7 +3463,11 @@ return; if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) { - update_typing_message(gtkconv, "\n"); +#ifdef RESERVE_LINE + update_typing_message(gtkconv, NULL); +#else + update_typing_message(gtkconv, "\n "); +#endif return; }