From 1d87607bd4e40b2d1723e8ad069d77cdd498a7ed Mon Sep 17 00:00:00 2001 From: George Fleming Date: Thu, 28 Apr 2016 11:44:09 -0700 Subject: [PATCH] Fix Undo/Redo --- src/Microsoft.PowerShell.PSReadLine/UndoRedo.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.PowerShell.PSReadLine/UndoRedo.cs b/src/Microsoft.PowerShell.PSReadLine/UndoRedo.cs index 128e6548ec..f54a96a87a 100644 --- a/src/Microsoft.PowerShell.PSReadLine/UndoRedo.cs +++ b/src/Microsoft.PowerShell.PSReadLine/UndoRedo.cs @@ -76,7 +76,8 @@ namespace Microsoft.PowerShell _singleton.ClearStatusMessage(render: false); } _singleton._edits[_singleton._undoEditIndex - 1].Undo(); - _singleton._edits.RemoveAt(_singleton._undoEditIndex - 1); + // How do you redo if you remove it permanently? +// _singleton._edits.RemoveAt(_singleton._undoEditIndex - 1); _singleton._undoEditIndex--; if (_singleton._options.EditMode == EditMode.Vi && _singleton._current >= _singleton._buffer.Length) {