From d605500ca2f4bf02968d963bd64e8d3ad05acbd1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 27 Sep 2019 14:29:09 +0300 Subject: [PATCH] Fix a bug in selection handling when deleting text --- source/entry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.43.0