diff --git a/defines.h b/defines.h index 26d5f58..56776ab 100644 --- a/defines.h +++ b/defines.h @@ -9,6 +9,7 @@ #define STATUS_UPDATE_SCREEN_RELOAD_FULL 32 #define STATUS_USER_ROOT 64 #define STATUS_INPUT_MATCH 128 +#define STATUS_DELTA_TIME 256 #define SETTINGS_HAS_COLOR 1 diff --git a/main.c b/main.c index 0b95bae..432a1e1 100644 --- a/main.c +++ b/main.c @@ -81,7 +81,7 @@ int main(){ temp_heigth = terminal_height; } if (threading) { - status &= ~(STATUS_RELOAD_DIRECTORY); + status &= ~(STATUS_RELOAD_DIRECTORY | STATUS_DELTA_TIME); threading = 0; } if (status & STATUS_RUN_BACKEND) { @@ -101,7 +101,7 @@ int main(){ time(&dt); if (dt - t >= SETTINGS_RELOAD_DIR_DELTA) { time(&t); - status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY); + status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY | STATUS_DELTA_TIME); } #endif diff --git a/threading.c b/threading.c index b96c0ca..f89291b 100644 --- a/threading.c +++ b/threading.c @@ -183,7 +183,7 @@ void *thread_rgt(){ free(rgt_buffer); rgt_buffer = malloc(sizeof(char)); rgt_buffer[0] = '\0'; - } else { + } else if ((status & STATUS_DELTA_TIME) != STATUS_DELTA_TIME) { unsigned long i = 0; for (i = 0; i < rgt_file_count; i++) {