Skip to content

Commit 6e4261b

Browse files
committed
Limit per server command history to 32.
1 parent a4d3e7d commit 6e4261b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/scripts/components/server/Console.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default () => {
9797

9898
const command = e.currentTarget.value;
9999
if (e.key === 'Enter' && command.length > 0) {
100-
setHistory(prevHistory => [ command, ...prevHistory! ]);
100+
setHistory(prevHistory => [ command, ...prevHistory! ].slice(0, 32));
101101
setHistoryIndex(-1);
102102

103103
instance && instance.send('send command', command);

0 commit comments

Comments
 (0)