Skip to content

Commit 9a85eed

Browse files
committed
Change Enter back to AcceptLine
AcceptAndValidateLine still has some problems, so the default has been changed back to AcceptLine.
1 parent 94a6ba4 commit 9a85eed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

PSReadLine/KeyBindings.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class KeyHandler
2525
/// The name of the function that a key is bound to, if any.
2626
/// </summary>
2727
public string Function { get; set; }
28+
2829
/// <summary>
2930
/// A short description of the behavior of the function.
3031
/// </summary>
@@ -100,7 +101,7 @@ void SetDefaultWindowsBindings()
100101
{
101102
_dispatchTable = new Dictionary<ConsoleKeyInfo, KeyHandler>(new ConsoleKeyInfoComparer())
102103
{
103-
{ Keys.Enter, MakeKeyHandler(ValidateAndAcceptLine, "ValidateAndAcceptLine") },
104+
{ Keys.Enter, MakeKeyHandler(AcceptLine, "AcceptLine") },
104105
{ Keys.ShiftEnter, MakeKeyHandler(AddLine, "AddLine") },
105106
{ Keys.Escape, MakeKeyHandler(RevertLine, "RevertLine") },
106107
{ Keys.LeftArrow, MakeKeyHandler(BackwardChar, "BackwardChar") },
@@ -173,7 +174,7 @@ void SetDefaultEmacsBindings()
173174
_dispatchTable = new Dictionary<ConsoleKeyInfo, KeyHandler>(new ConsoleKeyInfoComparer())
174175
{
175176
{ Keys.Backspace, MakeKeyHandler(BackwardDeleteChar, "BackwardDeleteChar") },
176-
{ Keys.Enter, MakeKeyHandler(ValidateAndAcceptLine,"ValidateAndAcceptLine") },
177+
{ Keys.Enter, MakeKeyHandler(AcceptLine, "AcceptLine") },
177178
{ Keys.ShiftEnter, MakeKeyHandler(AddLine, "AddLine") },
178179
{ Keys.LeftArrow, MakeKeyHandler(BackwardChar, "BackwardChar") },
179180
{ Keys.RightArrow, MakeKeyHandler(ForwardChar, "ForwardChar") },

0 commit comments

Comments
 (0)