X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e072113323f06e5c71f8d02789c17df541751eaf..a9e2e6e52b9c2371413597a92ccc4f8352963c32:/src/gtk/textentry.cpp diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index a84c0e691e..99d0f12943 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -193,7 +193,10 @@ void wxTextEntry::SetSelection(long from, long to) if ( from == -1 && to == -1 ) from = 0; - gtk_editable_select_region(GetEditable(), from, to); + // for compatibility with MSW, exchange from and to parameters so that the + // insertion point is set to the start of the selection and not its end as + // GTK+ does by default + gtk_editable_select_region(GetEditable(), to, from); } void wxTextEntry::GetSelection(long *from, long *to) const