Skip to content

Commit

Permalink
Update bubbles to v0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kencx committed May 8, 2024
1 parent 17b48e8 commit 8affa85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/kencx/keyb
go 1.21

require (
github.com/charmbracelet/bubbles v0.16.1
github.com/charmbracelet/bubbles v0.18.0
github.com/charmbracelet/bubbletea v0.26.1
github.com/charmbracelet/lipgloss v0.10.0
github.com/juju/ansiterm v1.0.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY=
github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc=
github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/39KLfy0=
github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw=
github.com/charmbracelet/bubbletea v0.26.1 h1:xujcQeF73rh4jwu3+zhfQsvV18x+7zIjlw7/CYbzGJ0=
github.com/charmbracelet/bubbletea v0.26.1/go.mod h1:FzKr7sKoO8iFVcdIBM9J0sJOcQv5nDQaYwsee3kpbgo=
github.com/charmbracelet/lipgloss v0.10.0 h1:KWeXFSexGcfahHX+54URiZGkBFazf70JNMtwg/AFW3s=
Expand Down
6 changes: 6 additions & 0 deletions ui/list/keymap.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ type TextInputKeyMap struct {
LineStart key.Binding
LineEnd key.Binding
Paste key.Binding
AcceptSuggestion key.Binding
NextSuggestion key.Binding
PrevSuggestion key.Binding
}

func CreateKeyMap(keys config.Keys) KeyMap {
Expand Down Expand Up @@ -84,6 +87,9 @@ func CreateKeyMap(keys config.Keys) KeyMap {
LineStart: SetKey(keys.CursorLineStart),
LineEnd: SetKey(keys.CursorLineEnd),
Paste: SetKey(keys.CursorPaste),
AcceptSuggestion: SetKey("tab"),
NextSuggestion: SetKey("ctrl+n"),
PrevSuggestion: SetKey("ctrl+p"),
},
}
}
Expand Down
1 change: 1 addition & 0 deletions ui/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func New(t *table.Model, c *config.Config) Model {
CharLimit: 0,
Cursor: cursor.New(),
KeyMap: textinput.KeyMap(keyMap.TextInputKeyMap),
ShowSuggestions: false,
},
startInSearchMode: c.SearchMode,

Expand Down

0 comments on commit 8affa85

Please sign in to comment.