fix: Space/Left/Right passthrough in host form, key/snippet refresh on save/delete, WindowSize to all tabs, footer improvements
This commit is contained in:
@@ -229,6 +229,24 @@ func (t *SnippetListTab) View() string {
|
||||
|
||||
func (t *SnippetListTab) Close() {}
|
||||
|
||||
// SetSnippets updates the snippet list data directly (used for refresh)
|
||||
func (t *SnippetListTab) SetSnippets(snippets []*models.Snippet) {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
t.state = snippetListReady
|
||||
t.snippets = snippets
|
||||
}
|
||||
|
||||
// FindSnippetListTab finds the first SnippetListTab in a list of tabs
|
||||
func FindSnippetListTab(tabs []Tab) *SnippetListTab {
|
||||
for _, tab := range tabs {
|
||||
if st, ok := tab.(*SnippetListTab); ok {
|
||||
return st
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// snippetListLoadedMsg carries the loaded snippet list
|
||||
type snippetListLoadedMsg struct {
|
||||
snippets []*models.Snippet
|
||||
|
||||
Reference in New Issue
Block a user