From 9d24e906a8561d4dffefc5a543c65e1f9745fc2d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 5 Mar 2020 12:29:31 +0100 Subject: [PATCH] text_area: fix interplay of shift with selection Without this patch, the text area would mistakenly delete the characters types after placing the cursor with the mouse as soon as shift is used as modifier. --- repos/gems/src/app/text_area/dialog.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/repos/gems/src/app/text_area/dialog.cc b/repos/gems/src/app/text_area/dialog.cc index 610ebdb3e..285b4a50a 100644 --- a/repos/gems/src/app/text_area/dialog.cc +++ b/repos/gems/src/app/text_area/dialog.cc @@ -472,8 +472,10 @@ void Dialog::handle_input_event(Input::Event const &event) if (shift_key(key)) { _shift = true; - if (!_selection.defined()) + if (!_selection.defined()) { _selection.start.construct(_cursor); + _selection.end.destruct(); + } } if (control_key(key))