charmbracelet / charmbracelet/bubbles

Margin is causing render issue with fany list.

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

Description

**Describe the bug**

Having `Margin(1,1)` in `appStyle.Margin(1, 1).Render(m.list.View())` is causing wired render issue with fancy-list when we search for something.

Basically, it's rendering a description of a list that is not matching text.

**Setup**
Please complete the following information along with version numbers, if applicable.
- OS: macOS]
- Shell: zsh
- Terminal Emulator: alacritty

**To Reproduce**

Update this code here https://github.com/charmbracelet/bubbletea/blob/main/examples/list-fancy/main.go#L180

**TO**
```
return appStyle.Margin(1, 1).Render(m.list.View())
```

After this run `go run *.go`

Search for `tes` by pressing `/`

image

**Expected behavior**

If there is no `Margin(1, 1)` added it renders fine.

image

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.