Replace termbox-go with tcell (#439)

Fix colour construction issue

This also has a test to mitigate it in the future

Remove `colormode` option

The original issue it was trying to solve is no longer present with
tcell (it being a holdover from `color256` on termbox) so it is not
needed.

retire gitter channel in favor of irc/matrix

Export options as environment variables (#448)

* Export options as environment variables

Any options from gOpts are available via lf_OPTION environment
variables. For now it works only on booleans, integers and strings (no
array support)

* Do not export some of the options

* Add support for arrays and fix numbers

* Fix comments

* Replace 1 and 0 with true and false

* Export hidden,reverse,dirfirst and sortby options

* Fix comments

* Little fix

* Simplify boolean conversion

log readlink errors instead of fail

Related #447 and #374
This commit is contained in:
Provessor authored and GitHub committed 2020-09-01 15:42:44 +03:00
1 parent d25faf7186
commit 24f01f4988
16 files changed
+477 -419

No files matched your search

+6 -15
View File
@@ -21,20 +21,11 @@ func (e *setExpr) eval(app *app, args []string) {
case "anchorfind!":
gOpts.anchorfind = !gOpts.anchorfind
case "color256":
gOpts.color256 = true
setColorMode()
app.ui.pause()
app.ui.resume()
app.ui.echoerr("option color256 is depreciated")
case "nocolor256":
gOpts.color256 = false
setColorMode()
app.ui.pause()
app.ui.resume()
app.ui.echoerr("option nocolor256 is depreciated")
case "color256!":
gOpts.color256 = !gOpts.color256
setColorMode()
app.ui.pause()
app.ui.resume()
app.ui.echoerr("option color256! is depreciated")
case "dircounts":
gOpts.dircounts = true
case "nodircounts":
@@ -284,7 +275,7 @@ func (e *setExpr) eval(app *app, args []string) {
return
}
gOpts.ratios = rats
app.ui.wins = getWins()
app.ui.wins = getWins(app.ui.screen)
app.ui.loadFile(app.nav)
case "shell":
gOpts.shell = e.val
@@ -793,8 +784,8 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.loadFileInfo(app.nav)
case "draw":
case "redraw":
app.ui.sync()
app.ui.renew()
app.ui.screen.Sync()
app.nav.height = app.ui.wins[0].h
app.ui.loadFile(app.nav)
app.ui.loadFileInfo(app.nav)
@@ -1056,7 +1047,7 @@ func (e *callExpr) eval(app *app, args []string) {
}
app.ui.draw(app.nav)
if len(matches) > 1 {
app.ui.menuBuf = listMatches(matches)
app.ui.menuBuf = listMatches(app.ui.screen, matches)
} else {
app.ui.menuBuf = nil
}