diff options
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index ebc85166caa5..25f3fe560e55 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -4712,9 +4712,12 @@ gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint if (nDeletePos < nPosition) { if (nDeleteEnd <= nPosition) - xText->setCaretPosition( nPosition-(nDeleteEnd-nDeletePos) ); + nPosition = nPosition - (nDeleteEnd - nDeletePos); else - xText->setCaretPosition( nDeletePos ); + nPosition = nDeletePos; + + if (xText->getCharacterCount() >= nPosition) + xText->setCaretPosition( nPosition ); } return true; } |