From: Mikko Rasa Date: Fri, 27 Sep 2019 11:29:09 +0000 (+0300) Subject: Fix a bug in selection handling when deleting text X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d605500ca2f4bf02968d963bd64e8d3ad05acbd1;p=libs%2Fgltk.git Fix a bug in selection handling when deleting text --- diff --git a/source/entry.cpp b/source/entry.cpp index 3212d85..1c66f98 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -407,7 +407,7 @@ void Entry::adjust_edit_position_for_change(unsigned pos, int change) { if(edit_pos>=pos) edit_pos -= min(edit_pos-pos, -change); - if(selection_active) + if(selection_active && selection_pos>=pos) selection_pos -= min(selection_pos-pos, -change); }