forgor them last commit
This commit is contained in:
@@ -365,6 +365,7 @@ void search(){
|
|||||||
mvwaddch(win_b, 0, i, ' ');
|
mvwaddch(win_b, 0, i, ' ');
|
||||||
}
|
}
|
||||||
mvwaddch(win_b, 0, 0, '/');
|
mvwaddch(win_b, 0, 0, '/');
|
||||||
|
memset(search_buffer, 0, INPUT_BUFFER_SIZE);
|
||||||
|
|
||||||
curs_set(1);
|
curs_set(1);
|
||||||
echo();
|
echo();
|
||||||
@@ -402,7 +403,7 @@ void search(){
|
|||||||
unsigned long index = (mid_dir.current_file - mid_dir.file_list);
|
unsigned long index = (mid_dir.current_file - mid_dir.file_list);
|
||||||
unsigned long x = getmaxx(win_b);
|
unsigned long x = getmaxx(win_b);
|
||||||
for (; &mid_dir.file_list[index] < mid_dir.file_list + mid_dir.file_count; index++) {
|
for (; &mid_dir.file_list[index] < mid_dir.file_list + mid_dir.file_count; index++) {
|
||||||
if (strstr(mid_dir.file_list[index].file_name, search_buffer)) {
|
if (smartstrcasestr(mid_dir.file_list[index].file_name, search_buffer)) {
|
||||||
mid_dir.current_file = &mid_dir.file_list[index];
|
mid_dir.current_file = &mid_dir.file_list[index];
|
||||||
|
|
||||||
/* re-render current dir */
|
/* re-render current dir */
|
||||||
@@ -430,7 +431,7 @@ void search(){
|
|||||||
void search_next(){
|
void search_next(){
|
||||||
long index = (mid_dir.current_file - mid_dir.file_list) + 1;
|
long index = (mid_dir.current_file - mid_dir.file_list) + 1;
|
||||||
for (; &mid_dir.file_list[index] < mid_dir.file_list + mid_dir.file_count; index++) {
|
for (; &mid_dir.file_list[index] < mid_dir.file_list + mid_dir.file_count; index++) {
|
||||||
if (strstr(mid_dir.file_list[index].file_name, search_buffer)) {
|
if (smartstrcasestr(mid_dir.file_list[index].file_name, search_buffer)) {
|
||||||
mid_dir.current_file = &mid_dir.file_list[index];
|
mid_dir.current_file = &mid_dir.file_list[index];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -440,7 +441,7 @@ void search_next(){
|
|||||||
void search_previous(){
|
void search_previous(){
|
||||||
long index = (mid_dir.current_file - mid_dir.file_list) - 1;
|
long index = (mid_dir.current_file - mid_dir.file_list) - 1;
|
||||||
for (; &mid_dir.file_list[index] >= mid_dir.file_list; index--) {
|
for (; &mid_dir.file_list[index] >= mid_dir.file_list; index--) {
|
||||||
if (strstr(mid_dir.file_list[index].file_name, search_buffer)) {
|
if (smartstrcasestr(mid_dir.file_list[index].file_name, search_buffer)) {
|
||||||
mid_dir.current_file = &mid_dir.file_list[index];
|
mid_dir.current_file = &mid_dir.file_list[index];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user