From 44d761e55cfd185b08081936979c9b89f593ecf7 Mon Sep 17 00:00:00 2001 From: Thomas ten Cate Date: Fri, 10 Aug 2018 11:23:13 +0200 Subject: 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 --- scene/gui/text_edit.cpp | 4 +--- 1 file changed, 1 insertion(+), 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 &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; -- cgit v1.2.3