Skip to content

Commit

Permalink
Deselect multi caret when alt clicking on it
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusElg committed Aug 24, 2023
1 parent 6758a7f commit a7f69f2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,15 @@ void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) {

caret = add_caret(row, col);
if (caret == -1) {
// Remove caret at clicked location
for (int i = 0; i < carets.size(); i++) {
if (get_caret_column(i) == col && get_caret_line(i) == row) {
remove_caret(i);
last_dblclk = 0;
return;
}
}

return;
}

Expand Down

0 comments on commit a7f69f2

Please sign in to comment.