Skip to content

Commit

Permalink
Only print components if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
joelim-work committed Jul 16, 2024
1 parent aca79ca commit 61cb0e3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,18 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty
win.print(ui.screen, lnwidth+1, i, st, fmt.Sprintf(cursorFmt, string(line)))

} else {
tagStr := fmt.Sprintf(optionToFmtstr(gOpts.tagfmt), string(tag))
win.print(ui.screen, lnwidth+1, i, tcell.StyleDefault, tagStr)
if tag != ' ' {
tagStr := fmt.Sprintf(optionToFmtstr(gOpts.tagfmt), string(tag))
win.print(ui.screen, lnwidth+1, i, tcell.StyleDefault, tagStr)
}

iconStyle := st
if iconDef.hasStyle {
iconStyle = iconDef.style
if len(icon) > 0 {
iconStyle := st
if iconDef.hasStyle {
iconStyle = iconDef.style
}
win.print(ui.screen, lnwidth+2, i, iconStyle, string(icon))
}
win.print(ui.screen, lnwidth+2, i, iconStyle, string(icon))

win.print(ui.screen, lnwidth+2+runeSliceWidth(icon), i, st, string(filename))
}
Expand Down

0 comments on commit 61cb0e3

Please sign in to comment.