Closed eilvelia closed 3 years ago
Currently
let g:qs_accepted_chars = [a-z, 0-9]
and
let g:qs_accepted_chars = [a-z, A-Z, 0-9]
behave the same.
The problem was in this line:
elseif (index(a:targets, char) != -1 && !g:qs_ignorecase) || index(a:targets, tolower(char)) != -1
If the character isn't found and g:qs_ignorecase set to false, it still fallbacks to tolower(char). So (index(a:targets, char) != -1 && !g:qs_ignorecase) doesn't make a difference here.
g:qs_ignorecase
tolower(char)
(index(a:targets, char) != -1 && !g:qs_ignorecase)
I replaced it with:
elseif index(a:targets, g:qs_ignorecase ? tolower(char) : char) != -1
Currently
and
behave the same.
The problem was in this line:
If the character isn't found and
g:qs_ignorecase
set to false, it still fallbacks totolower(char)
. So(index(a:targets, char) != -1 && !g:qs_ignorecase)
doesn't make a difference here.I replaced it with: