mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
fix: filepicker on empty directory
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
committed by
Maas Lalani
parent
9bfe8185f1
commit
7590e13c2a
@@ -423,6 +423,9 @@ func (m Model) DidSelectDisabledFile(msg tea.Msg) (bool, string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m Model) didSelectFile(msg tea.Msg) (bool, string) {
|
func (m Model) didSelectFile(msg tea.Msg) (bool, string) {
|
||||||
|
if len(m.files) == 0 {
|
||||||
|
return false, ""
|
||||||
|
}
|
||||||
switch msg := msg.(type) {
|
switch msg := msg.(type) {
|
||||||
case tea.KeyMsg:
|
case tea.KeyMsg:
|
||||||
// If the msg does not match the Select keymap then this could not have been a selection.
|
// If the msg does not match the Select keymap then this could not have been a selection.
|
||||||
|
|||||||
Reference in New Issue
Block a user