diff --git a/BizHawk.Client.Common/tools/RamSearchEngine.cs b/BizHawk.Client.Common/tools/RamSearchEngine.cs index 60c9f97233..bfe942b666 100644 --- a/BizHawk.Client.Common/tools/RamSearchEngine.cs +++ b/BizHawk.Client.Common/tools/RamSearchEngine.cs @@ -524,20 +524,28 @@ namespace BizHawk.Client.Common _history.Clear(); } - public void Undo() + public int Undo() { + int origCount = _watchList.Count; if (_keepHistory) { _watchList = _history.Undo().ToList(); + return _watchList.Count - origCount; } + + return _watchList.Count; } - public void Redo() + public int Redo() { + int origCount = _watchList.Count; if (_keepHistory) { _watchList = _history.Redo().ToList(); + return origCount - _watchList.Count; } + + return _watchList.Count; } #endregion diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs index 25459f4f40..5fadcd62a1 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamSearch.cs @@ -1243,11 +1243,12 @@ namespace BizHawk.Client.EmuHawk { if (_searches.CanUndo) { - _searches.Undo(); + int restoredCount = _searches.Undo(); UpdateList(); ToggleSearchDependentToolBarItems(); _forcePreviewClear = true; UpdateUndoToolBarButtons(); + MessageLabel.Text = restoredCount.ToString() + " address" + (restoredCount != 1 ? "es" : "") + " restored"; } } @@ -1255,11 +1256,12 @@ namespace BizHawk.Client.EmuHawk { if (_searches.CanRedo) { - _searches.Redo(); + int restoredCount = _searches.Redo(); UpdateList(); ToggleSearchDependentToolBarItems(); _forcePreviewClear = true; UpdateUndoToolBarButtons(); + MessageLabel.Text = restoredCount.ToString() + " address" + (restoredCount != 1 ? "es" : "") + " removed"; } }