diff options
author | Thomas ten Cate <ttencate@gmail.com> | 2018-08-10 11:23:13 +0200 |
---|---|---|
committer | Thomas ten Cate <ttencate@gmail.com> | 2018-08-10 11:23:13 +0200 |
commit | 44d761e55cfd185b08081936979c9b89f593ecf7 (patch) | |
tree | 16e0f7c68826b277bc47c356b2a0338f6af699e5 | |
parent | b293dd363e378ffd43e1385e024429d2d7526158 (diff) |
Reset caret blink when Ctrl+moving the cursor
There was a hardcoded exception to never reset caret blinking if Ctrl
(`command`) was pressed. This broke on Ctrl+arrows,
Ctrl+Home/End/PgUp/PgDn, Ctrl+C, Ctrl+V, Ctrl+Backspace and Ctrl+Delete.
Resetting blink only for those Ctrl operations that actually touch the
cursor somehow would clutter the code a lot, so I removed the check
entirely. That means we now also reset blinking on unrelated operations
like Ctrl+O, but that seems pretty harmless. I actually like the
additional bit of feedback even in that case (most of these will
immediately defocus the editor anyway, so you never see it).
Fixes #18100
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c9dcf058aa..af2dcf6df1 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -2195,9 +2195,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) { k->set_shift(false); } - if (!k->get_command()) { - _reset_caret_blink_timer(); - } + _reset_caret_blink_timer(); // save here for insert mode, just in case it is cleared in the following section bool had_selection = selection.active; |