mirror of
https://github.com/IllusionMan1212/gorc.git
synced 2026-10-24 02:12:33 +00:00
feat: handle more commands and properly implement older ones
* fix parser tests * write logs to file * gracefully terminate program * make viewport follow output * properly handle channel nicks and display them in the sidepanel * general refactors and fixes
This commit is contained in:
@@ -62,7 +62,20 @@ func (s InputState) Update(msg tea.Msg) (InputState, tea.Cmd) {
|
||||
return s, cmd
|
||||
}
|
||||
|
||||
func (s *InputState) Focus() {
|
||||
s.Input.Focus()
|
||||
s.Style = s.Style.Copy().BorderForeground(lipgloss.Color("105"))
|
||||
}
|
||||
|
||||
func (s *InputState) Blur() {
|
||||
s.Input.Blur()
|
||||
s.Style = s.Style.Copy().BorderForeground(lipgloss.Color("#EEE"))
|
||||
}
|
||||
|
||||
func (s *InputState) SetSize(width int) {
|
||||
// set a max width for the input field so it scrolls horizontally instead of wrapping to a newline
|
||||
// -4 for input prompt char, cursor, and some extra magical padding
|
||||
s.Input.Width = width - s.Style.GetHorizontalFrameSize() - 4
|
||||
s.Style = s.Style.Width(width - s.Style.GetHorizontalBorderSize())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user