25 lines
471 B
Go
25 lines
471 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() {
|
|
tea.NewProgram(
|
|
editor.NewModel(generateLines(64), action.Position{Line: 0, Col: 0}),
|
|
tea.WithAltScreen(),
|
|
).Run()
|
|
}
|