handle empty folders properly while drawing the ui
This commit is contained in:
parent
d3de4d8f32
commit
18bf206e8c
16
ui.go
16
ui.go
@ -535,16 +535,14 @@ func (ui *UI) draw(nav *Nav) {
|
||||
|
||||
if gOpts.preview {
|
||||
f, err := nav.currFile()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if err == nil {
|
||||
preview := ui.wins[len(ui.wins)-1]
|
||||
|
||||
preview := ui.wins[len(ui.wins)-1]
|
||||
|
||||
if f.IsDir() {
|
||||
preview.printd(ui.dirprev, nav.marks, nav.saves)
|
||||
} else if f.Mode().IsRegular() {
|
||||
preview.printr(ui.regprev)
|
||||
if f.IsDir() {
|
||||
preview.printd(ui.dirprev, nav.marks, nav.saves)
|
||||
} else if f.Mode().IsRegular() {
|
||||
preview.printr(ui.regprev)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user