X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=blobdiff_plain;f=libchimara%2Finput.c;h=df872da5496c6d582142b98b63c692e0e2864dce;hp=96b6353f96f4b4fb9de6eff5dcb762020d4b64c7;hb=830faf4676d26eb8094688e5ee995c2e2edce0e5;hpb=cc7434f897ab31bb797b519404100aae1da4fd81 diff --git a/libchimara/input.c b/libchimara/input.c index 96b6353..df872da 100644 --- a/libchimara/input.c +++ b/libchimara/input.c @@ -514,6 +514,15 @@ on_line_input_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win return TRUE; } + /* Handle the enter key, which could occur in the middle of the sentence. */ + else if(event->keyval == GDK_Return || event->keyval == GDK_KP_Enter) { + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(win->widget)); + GtkTextIter end_iter; + gtk_text_buffer_get_end_iter(buffer, &end_iter); + gtk_text_buffer_place_cursor(buffer, &end_iter); + return FALSE; + } + return FALSE; /* If this is a text grid window, then redirect the key press to the line input GtkEntry */