Raw event support with new tcell

This commit is contained in:
Zachary Yedidia
2019-12-31 22:34:43 -05:00
parent a2916c0e32
commit a2f7080602
5 changed files with 16 additions and 11 deletions

View File

@@ -7,7 +7,6 @@ import (
"os"
"sort"
"github.com/zyedidia/tcell"
"github.com/go-errors/errors"
isatty "github.com/mattn/go-isatty"
"github.com/zyedidia/micro/internal/action"
@@ -16,6 +15,7 @@ import (
"github.com/zyedidia/micro/internal/screen"
"github.com/zyedidia/micro/internal/shell"
"github.com/zyedidia/micro/internal/util"
"github.com/zyedidia/tcell"
)
var (
@@ -171,6 +171,8 @@ func main() {
}
}
screen.Init()
action.InitBindings()
action.InitCommands()
@@ -188,8 +190,6 @@ func main() {
screen.TermMessage(err)
}
screen.Init()
// If we have an error, we can exit cleanly and not completely
// mess up the terminal being worked in
// In other words we need to shut down tcell before the program crashes