|
@@ -2477,7 +2477,10 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
|
selection.selecting_column = col;
|
|
selection.selecting_column = col;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!mb->is_doubleclick() && (OS::get_singleton()->get_ticks_msec() - last_dblclk) < 600 && cursor.line == prev_line) {
|
|
|
|
|
|
+ const int triple_click_timeout = 600;
|
|
|
|
+ const int triple_click_tolerance = 5;
|
|
|
|
+
|
|
|
|
+ if (!mb->is_doubleclick() && (OS::get_singleton()->get_ticks_msec() - last_dblclk) < triple_click_timeout && mb->get_position().distance_to(last_dblclk_pos) < triple_click_tolerance) {
|
|
// Triple-click select line.
|
|
// Triple-click select line.
|
|
selection.selecting_mode = Selection::MODE_LINE;
|
|
selection.selecting_mode = Selection::MODE_LINE;
|
|
_update_selection_mode_line();
|
|
_update_selection_mode_line();
|
|
@@ -2487,6 +2490,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
|
selection.selecting_mode = Selection::MODE_WORD;
|
|
selection.selecting_mode = Selection::MODE_WORD;
|
|
_update_selection_mode_word();
|
|
_update_selection_mode_word();
|
|
last_dblclk = OS::get_singleton()->get_ticks_msec();
|
|
last_dblclk = OS::get_singleton()->get_ticks_msec();
|
|
|
|
+ last_dblclk_pos = mb->get_position();
|
|
}
|
|
}
|
|
|
|
|
|
update();
|
|
update();
|