fix: added the temp add keybind to the tui list

This commit is contained in:
Slug-Boi
2024-10-31 14:40:58 +01:00
parent ff9b648c59
commit c09bd403a9
+3 -2
View File
@@ -2,8 +2,8 @@ package tui
import ( import (
"fmt" "fmt"
"io"
"github.com/Slug-Boi/cocommit/src_code/go_src/cmd/utils" "github.com/Slug-Boi/cocommit/src_code/go_src/cmd/utils"
"io"
"os" "os"
"sort" "sort"
"strings" "strings"
@@ -156,7 +156,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case tea.KeyMsg: case tea.KeyMsg:
// deletion toggle with confirmation required // deletion toggle with confirmation required
b := false b := false
defer func(b *bool){deletion = *b}(&b) defer func(b *bool) { deletion = *b }(&b)
if m.list.FilterState() == list.Filtering { if m.list.FilterState() == list.Filtering {
break break
} }
@@ -301,6 +301,7 @@ func listModel() model {
listKeys.negation, listKeys.negation,
listKeys.groupSelect, listKeys.groupSelect,
listKeys.createAuthor, listKeys.createAuthor,
listKeys.tempAdd,
} }
} }
l.Styles.HelpStyle = helpStyle l.Styles.HelpStyle = helpStyle