fix: cursor actually need to take the renderer too

This commit is contained in:
Carlos Alexandro Becker
2024-02-26 14:09:54 -03:00
parent 577d38ac6f
commit 5fe4706dff
3 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -75,12 +75,14 @@ type Model struct {
}
// New creates a new model with default settings.
func New() Model {
func New(ctx *tea.Context) Model {
return Model{
BlinkSpeed: defaultBlinkSpeed,
Blink: true,
mode: CursorBlink,
Blink: true,
mode: CursorBlink,
TextStyle: ctx.Renderer.NewStyle(),
Style: ctx.Renderer.NewStyle(),
blinkCtx: &blinkCtx{
ctx: context.Background(),