summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-08-14 16:44:29 -0700
committerlouie <lshprung@yahoo.com>2020-08-14 16:44:29 -0700
commit73ba31618b28d72e241ff066080ed1a407a82aa3 (patch)
treec911a9a30c2bdc0033a79ac0761f3ca326037442 /draw.c
parent33e4fb7878f74bb756b9bfb71a4b656ac3541ebc (diff)
Added foldCase option
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/draw.c b/draw.c
index 13b125a..05ebb2d 100644
--- a/draw.c
+++ b/draw.c
@@ -398,11 +398,17 @@ void trav_col(int new_i){
int locateChar(char input){
int location = (true_hover ? e_hover : g_hover);
+ bool fold_case = get_case_sensitivity();
+ char first_char;
int i;
+ if(fold_case && input >= 97 && input <= 122) input -= 32;
+
if(true_hover){ //hovering on entries
for(i = location+1; i < e_count; i++){
- if(input == get_ename(e[i])[0]){
+ first_char = get_ename(e[i])[0];
+ if(fold_case && first_char >= 97 && first_char <= 122) first_char -= 32;
+ if(input == first_char){
location = i;
break;
}
@@ -411,6 +417,8 @@ int locateChar(char input){
else{ //hovering on groups
for(i = location+1; i < g_count; i++){
+ first_char = get_gname(g[i])[0];
+ if(fold_case && first_char >= 97 && first_char <= 122) first_char -= 32;
if(input == get_gname(g[i])[0]){
location = i;
break;