switch to tcell from termbox

This is a simple mostly straight forward switch to tcell in favor of
termbox.
It uses the tcell native api (not the compat layer) but does not make
use of most features.

Further changes should include moving to tcell's views.TextArea and the
general built in widget behaviour instead of the current ad hoc
implementation.

Regression: Cursor isn't shown in ex-line
This commit is contained in:
Markus Ongyerth 2018-06-01 09:58:00 +02:00 committed by Drew DeVault
parent 3836d240c9
commit 80e891a802
12 changed files with 151 additions and 159 deletions
lib/ui

View file

@ -3,7 +3,7 @@ package ui
import (
"fmt"
tb "github.com/nsf/termbox-go"
"github.com/gdamore/tcell"
)
type Stack struct {
@ -29,12 +29,7 @@ func (stack *Stack) Draw(ctx *Context) {
if len(stack.children) > 0 {
stack.Peek().Draw(ctx)
} else {
cell := tb.Cell{
Fg: tb.ColorDefault,
Bg: tb.ColorDefault,
Ch: ' ',
}
ctx.Fill(0, 0, ctx.Width(), ctx.Height(), cell)
ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)
}
}