handle empty folders properly while drawing the ui
This commit is contained in:
parent
d3de4d8f32
commit
18bf206e8c
6
ui.go
6
ui.go
@ -535,10 +535,7 @@ func (ui *UI) draw(nav *Nav) {
|
|||||||
|
|
||||||
if gOpts.preview {
|
if gOpts.preview {
|
||||||
f, err := nav.currFile()
|
f, err := nav.currFile()
|
||||||
if err != nil {
|
if err == nil {
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
preview := ui.wins[len(ui.wins)-1]
|
preview := ui.wins[len(ui.wins)-1]
|
||||||
|
|
||||||
if f.IsDir() {
|
if f.IsDir() {
|
||||||
@ -547,6 +544,7 @@ func (ui *UI) draw(nav *Nav) {
|
|||||||
preview.printr(ui.regprev)
|
preview.printr(ui.regprev)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ui.menubuf != nil {
|
if ui.menubuf != nil {
|
||||||
lines := strings.Split(ui.menubuf.String(), "\n")
|
lines := strings.Split(ui.menubuf.String(), "\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user