From 3e95b7ab9c8b86ea582edb7658da56c04a789218 Mon Sep 17 00:00:00 2001 From: night0721 Date: Fri, 11 Oct 2024 19:42:00 +0100 Subject: [PATCH] Make file content clear when meet a dir --- ccc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccc.c b/ccc.c index 2c9f421..1dcb128 100644 --- a/ccc.c +++ b/ccc.c @@ -837,10 +837,11 @@ void show_file_content() { file current_file = files->items[current_selection]; + wclear(preview_content); if (strncmp(current_file.type, "DIR", 3) == 0) + /* Print dir content */ return; - wclear(preview_content); FILE *file = fopen(current_file.path, "r"); if (file == NULL) {