From 9c5060584d43a9c28857c08d03af6b4668dcbc7f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 31 Jul 2025 17:32:41 +0200 Subject: [PATCH] Fix output log console to remove executed command from history no matter the placement --- Source/Editor/Windows/OutputLogWindow.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs index be6e6ff4d..4a91680f1 100644 --- a/Source/Editor/Windows/OutputLogWindow.cs +++ b/Source/Editor/Windows/OutputLogWindow.cs @@ -344,8 +344,8 @@ namespace FlaxEditor.Windows // Update history buffer if (_window._commandHistory == null) _window._commandHistory = new List(); - else if (_window._commandHistory.Count != 0 && _window._commandHistory.Last() == command) - _window._commandHistory.RemoveAt(_window._commandHistory.Count - 1); + else if (_window._commandHistory.Count != 0 && _window._commandHistory.Contains(command)) + _window._commandHistory.Remove(command); _window._commandHistory.Add(command); if (_window._commandHistory.Count > CommandHistoryLimit) _window._commandHistory.RemoveAt(0);