diff --git a/ui/chat_ui.gd b/ui/chat_ui.gd index 0e94e15..b157d70 100644 --- a/ui/chat_ui.gd +++ b/ui/chat_ui.gd @@ -893,8 +893,9 @@ func _on_entry_text_submitted(_value: String) -> void: func _send() -> void: if _send_pending: return - var body := _entry.text - if body.strip_edges().is_empty(): + var strippable_spaces := RegEx.create_from_string("(^\\s+|\\s+$)") + var body := strippable_spaces.sub(_entry.text, "", true) + if body.is_empty(): close_chat() return if _handle_editor_world_command(body):