diff --git a/ccc.c b/ccc.c index 1dcb128..58717da 100644 --- a/ccc.c +++ b/ccc.c @@ -1075,6 +1075,9 @@ void delete_files() change_dir(cwd, 0, 0); } } + for (int i = 0; i < marked->length; i++) { + arraylist_remove(marked, 0); + } } else { wpprintw("TODO: implement hard delete"); } diff --git a/file.c b/file.c index 5d32e32..7524381 100644 --- a/file.c +++ b/file.c @@ -60,12 +60,13 @@ void arraylist_remove(ArrayList *list, long index) if (index >= list->length) return; + /* marked stuff doesn't work with this free(list->items[index].name); free(list->items[index].path); free(list->items[index].type); free(list->items[index].stats); free(list->items[index].icon); - + */ for (long i = index; i < list->length - 1; i++) list->items[i] = list->items[i + 1];