From ce4f9f838da463c3e7c23718f3e587d453047965 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Fri, 28 Apr 2023 13:19:23 -0400 Subject: [PATCH] fix missing newline on single row output --- src/commands/ls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands/ls.c b/src/commands/ls.c index 36725f2..1c8384a 100644 --- a/src/commands/ls.c +++ b/src/commands/ls.c @@ -218,6 +218,9 @@ static void list_files(struct FileInfo* files, int file_len, struct FileListInfo } } } + + if (info.total_len <= w.ws_col) printf("\n"); + } static bool is_dot_dir(const char* path) {