mirror of
https://gittea.dev/nova/th.git
synced 2025-10-21 18:30:15 -04:00
search file function now does file previews
This commit is contained in:
9
dir.c
9
dir.c
@@ -313,18 +313,23 @@ void print_dir(WINDOW *win, char print_info, unsigned long *dir_file_count, file
|
||||
free(bg);
|
||||
}
|
||||
|
||||
void update_selected_file(){
|
||||
char update_selected_file(){
|
||||
char ret = -1; /* -1 on empty or inaccessible file, 0 on unchanged file, 1 on changed file */
|
||||
if (mid_content->file_name[0] == '\0') { /* only happens if the current path is either empty or inaccessible */
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
if (selected_file_current >= mid_file_count) {
|
||||
selected_file_current = mid_file_count-1;
|
||||
}
|
||||
if (selected_file_current != selected_file_last) {
|
||||
mid_content[selected_file_last].status &= ~FILE_STATUS_HOVER;
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
mid_content[selected_file_current].status |= FILE_STATUS_HOVER;
|
||||
selected_file_last = selected_file_current;
|
||||
return ret;
|
||||
}
|
||||
void dir_set_selected_file_current(unsigned long selected_file_current){
|
||||
if (mid_content->file_name[0] != '\0') {
|
||||
|
Reference in New Issue
Block a user