refactor: remove some of the clear screen commands

This commit is contained in:
Slug-Boi
2024-11-16 23:20:25 +01:00
parent 597d4f5572
commit a3336ed6c0
3 changed files with 9 additions and 13 deletions
+4 -6
View File
@@ -14,7 +14,6 @@ import (
"github.com/charmbracelet/bubbles/textarea"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/inancgumus/screen"
)
type KeyMap struct {
@@ -43,8 +42,7 @@ func Entry_CM() string {
log.Fatal(err)
}
if m.(model_cm).textarea.Value() == "" {
screen.Clear()
screen.MoveTopLeft()
fmt.Println("No commit message provided. Exiting...")
os.Exit(0)
}
@@ -62,9 +60,9 @@ type model_cm struct {
func initialModel_cm() model_cm {
ti := textarea.New()
ti.FocusedStyle = textarea.Style{
Base: lipgloss.NewStyle().Foreground(lipgloss.Color("170")),
LineNumber: lipgloss.NewStyle().Foreground(lipgloss.Color("90")),
}
Base: lipgloss.NewStyle().Foreground(lipgloss.Color("170")),
LineNumber: lipgloss.NewStyle().Foreground(lipgloss.Color("90")),
}
ti.SetWidth(80)
ti.SetHeight(8)