diff --git a/src/entryList.go b/src/entryList.go index c8c5b43..06e7dd7 100644 --- a/src/entryList.go +++ b/src/entryList.go @@ -59,7 +59,7 @@ func printFileEntry(entry string, lastSlash int, charCounter int, colorAlternato // determine whether to wrap to a new line (+1 is to account for trailing spaces) charCounter += len(fileEntryName) + 1 - if charCounter >= width { + if charCounter+(indent*2) >= width { charCounter = len(fileEntryName) + 1 fmt.Print("\n" + strings.Repeat(" ", indent*2)) // indent each line }