From 0cc59d9fb1d192584d910a5618bf05ea3b4b63d2 Mon Sep 17 00:00:00 2001 From: koki-develop Date: Thu, 18 May 2023 20:54:28 +0900 Subject: [PATCH] fix some --- model.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/model.go b/model.go index 5c0e329..c7199c9 100644 --- a/model.go +++ b/model.go @@ -383,6 +383,8 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case key.Matches(msg, m.option.keymap.Toggle): // toggle m.toggle() + m.fixYPosition() + m.fixCursor() case key.Matches(msg, m.option.keymap.Up): // up switch m.option.inputPosition { @@ -464,7 +466,12 @@ func (m *model) toggle() { } } - m.cursorDown() + switch m.option.inputPosition { + case InputPositionTop: + m.cursorDown() + case InputPositionBottom: + m.cursorUp() + } } func (m *model) cursorUp() {