tui: add border above input

This commit is contained in:
Matt Low 2024-03-28 06:53:39 +00:00
parent a669313a0b
commit 3e24a54d0a
1 changed files with 9 additions and 2 deletions

View File

@ -204,7 +204,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.width = msg.Width
m.height = msg.Height
m.content.Width = msg.Width
m.input.SetWidth(msg.Width - 1)
m.input.SetWidth(msg.Width)
m.rebuildMessageCache()
m.updateContent()
case msgConversationLoaded:
@ -461,10 +461,17 @@ func initialModel(ctx *lmcli.Context, convShortname string) model {
m.input.CharLimit = 0
m.input.Placeholder = "Enter a message"
m.input.FocusedStyle.CursorLine = lipgloss.NewStyle()
m.input.ShowLineNumbers = false
m.input.SetHeight(4)
m.input.Focus()
m.input.FocusedStyle.CursorLine = lipgloss.NewStyle()
m.input.FocusedStyle.Base = lipgloss.NewStyle().
BorderTop(true).
BorderStyle(lipgloss.NormalBorder())
m.input.BlurredStyle.Base = lipgloss.NewStyle().
Faint(true).
BorderTop(true).
BorderStyle(lipgloss.NormalBorder())
m.spinner = spinner.New(spinner.WithSpinner(
spinner.Spinner{