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

+9 -7
View File
@@ -10,16 +10,17 @@ import (
"strings"
"time"
"github.com/doronbehar/termbox-go"
"github.com/gdamore/tcell"
)
func run() {
if err := termbox.Init(); err != nil {
log.Fatalf("initializing termbox: %s", err)
var screen tcell.Screen
var err error
if screen, err = tcell.NewScreen(); err != nil {
log.Fatalf("creating screen: %s", err)
} else if err = screen.Init(); err != nil {
log.Fatalf("initializing screen: %s", err)
}
defer termbox.Close()
setColorMode()
f, err := os.Create(gLogPath)
if err != nil {
@@ -31,7 +32,7 @@ func run() {
log.Print("hi!")
app := newApp()
app := newApp(screen)
if err := app.nav.readMarks(); err != nil {
app.ui.echoerrf("reading marks file: %s", err)
@@ -42,6 +43,7 @@ func run() {
}
app.loop()
app.ui.screen.Fini()
}
func readExpr() <-chan expr {