always export lf_options before previewing (#468)

* always export lf_options before previewing

related functions were moved to `os.go`
and now exportOpts isn't called through
an app, so it can be called independently

* move related functions to main.go

so they get compiled on windows too
This commit is contained in:
gotroyb127 authored and GitHub committed 2020-09-18 00:50:45 +03:00
1 parent 76c85d9459
commit 7a3bd15903
3 files changed
+83 -82

No files matched your search

+1
View File
@@ -427,6 +427,7 @@ func (nav *nav) preview() {
var reader io.Reader
if len(gOpts.previewer) != 0 {
exportOpts()
cmd := exec.Command(gOpts.previewer, curr.path, strconv.Itoa(nav.height))
out, err := cmd.StdoutPipe()