Gim/cmd/gim/main.go
Hayden Hargreaves 07589e3897 feat: huge implementation! 'd' op working well, tested good
Not totally complete WRT tests, but lots of progress. These interfaces
make everything easy.
2026-02-12 23:34:07 -07:00

27 lines
565 B
Go

package main
import (
"fmt"
"git.gophernest.net/azpect/TextEditor/internal/action"
"git.gophernest.net/azpect/TextEditor/internal/editor"
tea "github.com/charmbracelet/bubbletea"
)
func generateLines(n int) []string {
lines := make([]string, n)
for i := range n {
lines[i] = fmt.Sprintf("line %d", i+1)
}
return lines
}
func main() {
// lines := []string{"Hello world testing main.go", "line 2", "line 3", "line 4", "line 5"}
tea.NewProgram(
editor.NewModel(generateLines(32), action.Position{Line: 0, Col: 0}),
tea.WithAltScreen(),
).Run()
}