From 9d30cbd22a3f78efb6984a347630d8d601002bc1 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sat, 10 May 2025 10:52:34 +1000 Subject: make clipboard available when handling user-invoked chat commands --- source/frontend/StarClientCommandProcessor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/frontend/StarClientCommandProcessor.cpp') diff --git a/source/frontend/StarClientCommandProcessor.cpp b/source/frontend/StarClientCommandProcessor.cpp index ec8d743..d0afb0c 100644 --- a/source/frontend/StarClientCommandProcessor.cpp +++ b/source/frontend/StarClientCommandProcessor.cpp @@ -11,6 +11,7 @@ #include "StarQuestInterface.hpp" #include "StarStatistics.hpp" #include "StarInterfaceLuaBindings.hpp" +#include "StarInput.hpp" namespace Star { @@ -74,7 +75,10 @@ String ClientCommandProcessor::previewQuestPane(StringList const& arguments, fun return "No such quest"; } -StringList ClientCommandProcessor::handleCommand(String const& commandLine) { +StringList ClientCommandProcessor::handleCommand(String const& commandLine, bool userInput) { + Maybe unlock; + if (userInput) // allow clipboard usage during this code + unlock = Input::singleton().unlockClipboard(); try { if (!commandLine.beginsWith("/")) throw StarException("ClientCommandProcessor expected command, does not start with '/'"); -- cgit v1.2.3