mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
fix: line freeze on dir open + var typo
This commit is contained in:
@@ -57,7 +57,7 @@ type errorMsg struct {
|
||||
type readDirMsg []os.DirEntry
|
||||
|
||||
const (
|
||||
marginBottom = 6
|
||||
marginBottom = 5
|
||||
fileSizeWidth = 8
|
||||
paddingLeft = 2
|
||||
)
|
||||
@@ -227,12 +227,12 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||
switch msg := msg.(type) {
|
||||
case readDirMsg:
|
||||
m.files = msg
|
||||
m.max = m.Height
|
||||
m.max = m.Height - 1
|
||||
case tea.WindowSizeMsg:
|
||||
if m.AutoHeight {
|
||||
m.Height = msg.Height - marginBottom
|
||||
}
|
||||
m.max = m.Height
|
||||
m.max = m.Height - 1
|
||||
case tea.KeyMsg:
|
||||
switch {
|
||||
case key.Matches(msg, m.KeyMap.GoToTop):
|
||||
|
||||
Reference in New Issue
Block a user