(app *app, volatile bool)
| 616 | } |
| 617 | |
| 618 | func (ui *ui) loadFile(app *app, volatile bool) { |
| 619 | if volatile { |
| 620 | app.nav.previewChan <- "" |
| 621 | } |
| 622 | |
| 623 | curr := app.nav.currFile() |
| 624 | if curr == nil { |
| 625 | return |
| 626 | } |
| 627 | |
| 628 | if curr.path != ui.currentFile { |
| 629 | ui.currentFile = curr.path |
| 630 | onSelect(app) |
| 631 | } |
| 632 | |
| 633 | if !gOpts.preview { |
| 634 | return |
| 635 | } |
| 636 | |
| 637 | if curr.isPreviewable() { |
| 638 | app.nav.loadReg(curr.path, volatile) |
| 639 | } else if curr.IsDir() { |
| 640 | dir := app.nav.getDir(curr.path) |
| 641 | app.nav.checkDir(dir) |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | func (ui *ui) drawPromptLine(nav *nav) { |
| 646 | st := tcell.StyleDefault |
no test coverage detected