Skip to content

Commit

Permalink
Fix bug when lesskey #env section contains one environment
Browse files Browse the repository at this point in the history
variable which is a prefix of another one.
Fixes #473.
  • Loading branch information
gwsw committed Feb 4, 2024
1 parent 1991ccc commit 9ea9003
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,9 @@ static int cmd_search(constant char *cmd, constant char *table, constant char *e
* but not the end of the string in the command table.
* The user's command is incomplete.
*/
return A_PREFIX;
if (a == A_INVALID)
a = A_PREFIX;
q = cmd-1;
} else
{
/*
Expand Down

0 comments on commit 9ea9003

Please sign in to comment.