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

(cherry picked from commit 44d761e55c)
This commit is contained in:
Thomas ten Cate 2018-08-10 11:23:13 +02:00 committed by Rémi Verschelde
parent d3b67bde8a
commit 2e34a922f0
1 changed files with 1 additions and 3 deletions

View File

@ -2277,9 +2277,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
k->set_shift(false);
}
if (!k->get_command()) {
_reset_caret_blink_timer();
}
// save here for insert mode, just in case it is cleared in the following section
bool had_selection = selection.active;