Skip to content

Commit 073a985

Browse files
committed
feat(game-command): allow multiple commands separated by semicolon (;)
will be customizable in the future
1 parent e433397 commit 073a985

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

electron/renderer/components/game/game-command-input.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ export const GameCommandInput: React.FC = (): ReactNode => {
3131
// <Enter> = perform new command
3232
else if (!isEmpty(command)) {
3333
setLastCommand(command);
34+
// TODO customize the command separator, and whether to use it or not
35+
const cmds = command.split(';');
3436
runInBackground(async () => {
35-
await window.api.sendCommand(command);
37+
for (const cmd of cmds) {
38+
await window.api.sendCommand(cmd);
39+
}
3640
});
3741
}
3842
}

0 commit comments

Comments
 (0)