Skip to content

Commit 7e688f0

Browse files
mikebattistadaxian-dbw
authored andcommitted
Fix RepeatLastCharSearch and RepeatLastCharSearchBackwards to not flip their functionalities (#1253)
1 parent a1d3ec3 commit 7e688f0

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

PSReadLine/ReadLine.vi.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public static bool SearchDelete(char keyChar, object arg, bool backoff, Action<C
7676

7777
public static void SearchBackward(char keyChar, object arg, bool backoff)
7878
{
79-
Set(keyChar, isBackward: true, isBackoff: backoff);
8079
int qty = arg as int? ?? 1;
8180

8281
for (int i = _singleton._current - 1; i >= 0; i--)

test/MovementTest.VI.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,35 @@ public void ViCharacterSearch()
508508
"dd"
509509
));
510510

511+
Test("", Keys(
512+
"0101010",
513+
CheckThat(() => AssertCursorLeftIs(7)),
514+
_.Escape,
515+
_.Uphat,
516+
"f1",
517+
CheckThat(() => AssertCursorLeftIs(1)),
518+
";",
519+
CheckThat(() => AssertCursorLeftIs(3)),
520+
";",
521+
CheckThat(() => AssertCursorLeftIs(5)),
522+
",",
523+
CheckThat(() => AssertCursorLeftIs(3)),
524+
",",
525+
CheckThat(() => AssertCursorLeftIs(1)),
526+
_.Dollar,
527+
"F1",
528+
CheckThat(() => AssertCursorLeftIs(5)),
529+
";",
530+
CheckThat(() => AssertCursorLeftIs(3)),
531+
";",
532+
CheckThat(() => AssertCursorLeftIs(1)),
533+
",",
534+
CheckThat(() => AssertCursorLeftIs(3)),
535+
",",
536+
CheckThat(() => AssertCursorLeftIs(5)),
537+
"dd"
538+
));
539+
511540
TestMustDing("01234", Keys(
512541
"01234",
513542
CheckThat(() => AssertCursorLeftIs(5)),

0 commit comments

Comments
 (0)