Refinement of line terminators
authorP. F. Chimento <philip.chimento@gmail.com>
Tue, 26 Apr 2011 21:30:03 +0000 (23:30 +0200)
committerP. F. Chimento <philip.chimento@gmail.com>
Tue, 26 Apr 2011 21:30:03 +0000 (23:30 +0200)
Handle line terminator key being pressed when cursor is in the middle
of the input line

libchimara/input.c

index 6003f501bf7bff13a239e44a07a4ee232794ffb4..4036117f48e5c900935bad3683a96c2bd137ae81 100644 (file)
@@ -549,6 +549,7 @@ on_line_input_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win
                                GtkTextIter end;
                                gtk_text_buffer_get_end_iter(buffer, &end);
                                gtk_text_buffer_insert(buffer, &end, "\n", 1);
+                               gtk_text_buffer_place_cursor(buffer, &end);
 
                                /* Make the window uneditable again and retrieve the text that was input */
                                gtk_text_view_set_editable(GTK_TEXT_VIEW(win->widget), FALSE);