Skip to content

Commit

Permalink
Skip over duplicate history entries when searching backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
zickgraf committed Feb 13, 2023
1 parent fdc3aef commit c1b49f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cmdledit.g
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ GAPInfo.CommandLineEditFunctions.Functions.BackwardHistory := function(l)
fi;
while n > 1 do
n := n - 1;
if PositionSublist(hist[n], start) = 1 then
if StartsWith(hist[n], start) and hist[n] <> l[3] then
GAPInfo.History.Pos := n;
GAPInfo.History.Last := n;
return [1, Length(l[3])+1, hist[n], l[4]];
Expand Down

0 comments on commit c1b49f9

Please sign in to comment.