MCPcopy Create free account
hub / github.com/gokcehan/lf / loadFile

Method loadFile

ui.go:618–643  ·  view source on GitHub ↗
(app *app, volatile bool)

Source from the content-addressed store, hash-verified

616}
617
618func (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
645func (ui *ui) drawPromptLine(nav *nav) {
646 st := tcell.StyleDefault

Callers 12

copyAsyncMethod · 0.80
moveAsyncMethod · 0.80
delMethod · 0.80
evalMethod · 0.80
evalMethod · 0.80
updateFunction · 0.80
resetIncCmdFunction · 0.80
insertFunction · 0.80
cdFunction · 0.80
evalMethod · 0.80
loopMethod · 0.80
runCmdSyncMethod · 0.80

Calls 7

onSelectFunction · 0.85
currFileMethod · 0.80
isPreviewableMethod · 0.80
loadRegMethod · 0.80
getDirMethod · 0.80
checkDirMethod · 0.80
IsDirMethod · 0.45

Tested by

no test coverage detected