Skip to content

Commit 6973087

Browse files
committed
Fixed duplicate command history bug
1 parent 07b8d15 commit 6973087

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

jars/lw_Console.jar

22 Bytes
Binary file not shown.

src/org/lazywizard/console/overlay/v2/panels/ConsoleOverlayPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ class ConsoleOverlayPanel(private val context: CommandContext) : BaseCustomUIPan
10241024

10251025
//Only save if the command entered isnt equal to the one before, and those that arent blank
10261026
lastCommandIndex = 0
1027-
if (lastCommands.getOrNull(0) != commandInput && commandInput.isNotBlank() && !commandInput.lowercase().startsWith("history")) {
1027+
if ( (lastCommands.getOrNull(0)?.trim() != commandInput.trim()) && commandInput.isNotBlank() && !commandInput.lowercase().startsWith("history")) {
10281028
lastCommands.add(0, commandInput)
10291029
if (lastCommands.size > maxSavedCommands) {
10301030
lastCommands.removeLast()

0 commit comments

Comments
 (0)