This commit is contained in:
niksedk 2023-03-28 06:43:26 +02:00
parent fead98c2ea
commit d3c81f8620

View File

@ -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;
}
}