Skip to content

Commit da2f922

Browse files
committed
Tab now does the same as Enter on command line search ('/').
1 parent 638fac8 commit da2f922

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

PSReadLine/ReadLine.vi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ private void StartSearch(bool backward)
866866
while (true)
867867
{
868868
var nextKey = ReadKey();
869-
if (nextKey.Key == Keys.Enter.Key)
869+
if (nextKey.Key == Keys.Enter.Key || nextKey.Key == Keys.Tab.Key)
870870
{
871871
_searchHistoryPrefix = argBuffer.ToString();
872872
_searchHistoryBackward = backward;

UnitTestPSReadLine/HistoryTest.VI.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ public void ViTestHistoryRepeat()
9292
"nn"
9393
) );
9494

95+
Test("anyway", Keys(
96+
_.Escape, _.Slash, "way", _.Tab, CheckThat(() => AssertLineIs("anyway")),
97+
"nnnn", CheckThat(() => AssertLineIs("that way")),
98+
"N", CheckThat(() => AssertLineIs("anyway")),
99+
"N", CheckThat(() => AssertLineIs("no way")),
100+
"n"
101+
));
102+
95103
}
96104

97105
[TestMethod]

0 commit comments

Comments
 (0)