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.
This commit is contained in:
Norman Feske 2020-03-05 12:29:31 +01:00 committed by Christian Helmuth
parent 44e4d1bd6c
commit 9d24e906a8
1 changed files with 3 additions and 1 deletions

View File

@ -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))