Clean up some old code
This commit is contained in:
parent
1c41b63f08
commit
d67c8a60ef
|
@ -77,9 +77,6 @@ func (ctx *Context) Printf(x, y int, style tcell.Style,
|
||||||
return y < height
|
return y < height
|
||||||
}
|
}
|
||||||
for _, ch := range str {
|
for _, ch := range str {
|
||||||
if str == " こんにちは " {
|
|
||||||
fmt.Printf("%c\n", ch)
|
|
||||||
}
|
|
||||||
switch ch {
|
switch ch {
|
||||||
case '\n':
|
case '\n':
|
||||||
if !newline() {
|
if !newline() {
|
||||||
|
@ -102,10 +99,6 @@ func (ctx *Context) Printf(x, y int, style tcell.Style,
|
||||||
return runewidth.StringWidth(str)
|
return runewidth.StringWidth(str)
|
||||||
}
|
}
|
||||||
|
|
||||||
//func (ctx *Context) Screen() tcell.Screen {
|
|
||||||
// return ctx.screen
|
|
||||||
//}
|
|
||||||
|
|
||||||
func (ctx *Context) Fill(x, y, width, height int, rune rune, style tcell.Style) {
|
func (ctx *Context) Fill(x, y, width, height int, rune rune, style tcell.Style) {
|
||||||
vp := views.NewViewPort(ctx.viewport, x, y, width, height)
|
vp := views.NewViewPort(ctx.viewport, x, y, width, height)
|
||||||
vp.Fill(rune, style)
|
vp.Fill(rune, style)
|
||||||
|
|
|
@ -41,15 +41,18 @@ func Initialize(conf *config.AercConfig,
|
||||||
tcEvents: make(chan tcell.Event, 10),
|
tcEvents: make(chan tcell.Event, 10),
|
||||||
invalidations: make(chan interface{}),
|
invalidations: make(chan interface{}),
|
||||||
}
|
}
|
||||||
//tb.SetOutputMode(tb.Output256)
|
|
||||||
go (func() {
|
go (func() {
|
||||||
for !state.Exit {
|
for !state.Exit {
|
||||||
state.tcEvents <- screen.PollEvent()
|
state.tcEvents <- screen.PollEvent()
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
go (func() { state.invalidations <- nil })()
|
go (func() {
|
||||||
|
state.invalidations <- nil
|
||||||
|
})()
|
||||||
content.OnInvalidate(func(_ Drawable) {
|
content.OnInvalidate(func(_ Drawable) {
|
||||||
go (func() { state.invalidations <- nil })()
|
go (func() {
|
||||||
|
state.invalidations <- nil
|
||||||
|
})()
|
||||||
})
|
})
|
||||||
return &state, nil
|
return &state, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue