From 9ae41a0f004556bccc4499faed6f48d2320adead Mon Sep 17 00:00:00 2001 From: phallobst Date: Tue, 5 Jul 2016 23:42:37 +0200 Subject: [PATCH] Update position correctly in wxGTK insert-text signal handler "position" argument is input/output and must point after the newly inserted text on return, but we didn't do it when handling the insertion specially. Closes #17591. --- src/gtk/textentry.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index f031844925..af7972d697 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -120,7 +120,13 @@ wx_gtk_insert_text_callback(GtkEditable *editable, } if ( handled ) + { + // We must update the position to point after the newly inserted text, + // as expected by GTK+. + *position = text->GetInsertionPoint(); + g_signal_stop_emission_by_name (editable, "insert_text"); + } } //-----------------------------------------------------------------------------