Skip to content

Commit

Permalink
complete ASCII speedup of case-insensitive scrollback search matching (
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed May 3, 2020
1 parent 3dc0fd6 commit a453a3d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,12 @@ static uint
case_fold(uint ch)
{
// speedup ASCII
if (ch >= 'A' && ch <= 'Z')
return ch + 'a' - 'A';
if (ch < 0x80) {
if (ch >= 'A' && ch <= 'Z')
return ch + 'a' - 'A';
else
return ch;
}

// binary search in table
int min = 0;
Expand Down

0 comments on commit a453a3d

Please sign in to comment.