From 1427993a25d0b048b547c2a8e02f79473e8c4c31 Mon Sep 17 00:00:00 2001 From: Martin Fournier Date: Tue, 21 Dec 2021 07:35:20 -0500 Subject: [PATCH] Fix #1901: Fix blade console command history Up or down would not properly update the visible input value --- src/Bladeburner/ui/Console.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Bladeburner/ui/Console.tsx b/src/Bladeburner/ui/Console.tsx index 7cbc8ec36..671345b1a 100644 --- a/src/Bladeburner/ui/Console.tsx +++ b/src/Bladeburner/ui/Console.tsx @@ -104,6 +104,7 @@ export function Console(props: IProps): React.ReactElement { setConsoleHistoryIndex(i); const prevCommand = consoleHistory[i]; event.currentTarget.value = prevCommand; + setCommand(prevCommand); } if (event.keyCode === 40) { @@ -125,6 +126,7 @@ export function Console(props: IProps): React.ReactElement { setConsoleHistoryIndex(consoleHistoryIndex + 1); const prevCommand = consoleHistory[consoleHistoryIndex + 1]; event.currentTarget.value = prevCommand; + setCommand(prevCommand); } } }