Skip to content

Commit

Permalink
fix some
Browse files Browse the repository at this point in the history
  • Loading branch information
koki-develop committed May 18, 2023
1 parent 7295f81 commit 0cc59d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 0cc59d9

Please sign in to comment.