Ctrl + S on yarn_editor.gd is not limited to focus (or to when the control is visible) causing the yarn file to be compiled when working on other scripts/resources/scenes, including when the tab is not showing.
More importantly it blocks those other things from saving as the event is accepted. It also makes things less responsive.
I think the issue is this in yarn_editor.gd:
func _shortcut_input(event: InputEvent) -> void:
if event is InputEventKey and event.pressed:
if event.ctrl_pressed and event.keycode == KEY_S:
if not _current_path.is_empty():
_save_file()
accept_event()
Adding in a focus check fixes it:
func _shortcut_input(event: InputEvent) -> void:
var focus := self.get_viewport().gui_get_focus_owner()
if not is_ancestor_of(focus):
return
if event is InputEventKey and event.pressed:
if event.ctrl_pressed and event.keycode == KEY_S:
if not _current_path.is_empty():
_save_file()
accept_event()
Ctrl + S on yarn_editor.gd is not limited to focus (or to when the control is visible) causing the yarn file to be compiled when working on other scripts/resources/scenes, including when the tab is not showing.
More importantly it blocks those other things from saving as the event is accepted. It also makes things less responsive.
I think the issue is this in yarn_editor.gd:
Adding in a focus check fixes it: