From d3c81f86207dc331565b08c90dc728159599e816 Mon Sep 17 00:00:00 2001 From: niksedk Date: Tue, 28 Mar 2023 06:43:26 +0200 Subject: [PATCH] Undo https://github.com/SubtitleEdit/subtitleedit/commit/1956ad296d9a7d07f8684d7d3c36920e16f96397 --- src/ui/Forms/Main.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 24f52241b..574cc8c49 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -29746,13 +29746,14 @@ namespace Nikse.SubtitleEdit.Forms if (_listViewTextUndoLast != newText) { + MakeHistoryForUndo(_languageGeneral.Text + ": " + _listViewTextUndoLast.TrimEnd() + " -> " + newText, false); + int hidx = _subtitle.HistoryItems.Count - 1; if (hidx >= 0 && hidx < _subtitle.HistoryItems.Count) { var historyParagraph = _subtitle.HistoryItems[hidx].Subtitle.GetParagraphOrDefault(index); if (historyParagraph != null) { - MakeHistoryForUndo(_languageGeneral.Text + ": " + _listViewTextUndoLast.TrimEnd() + " -> " + newText, false); historyParagraph.Text = _listViewTextUndoLast; } }