charmbracelet / charmbracelet/bubbles

filepicker: default Height of 0 causes view to break when traversing directories

Open
#864 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
8.9k
Forks
457
Avg merge
1d 18h
Merged PRs (30d)
5

Description

**Describe the bug**
The [default Height of the filepicker is set to 0](https://github.com/charmbracelet/bubbles/blob/ff8b5a8e17c91972211d0b9f03e7764ddaa2f6d0/filepicker/filepicker.go#L40). When I go to the parent directory or go down a directory (i.e. press H or L), the view breaks. The `filepicker.View()` renders nothing, not even the "No files found".

Just `fp.SetHeight(1)` fixes it in my code, so I think it makes sense to have the Height set to 1 by default.

**Setup**
- Windows 11/WSL 2.4.12.0
- zsh 5.9
- Windows terminal
- No multiplexer

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.