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:
swanadiva
2026-06-23 18:48:50 +07:00
parent 9d0338595d
commit 7d41391e13
8 changed files with 118 additions and 11 deletions
+18
View File
@@ -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