mirror of
https://github.com/Gu1llaum-3/sshm.git
synced 2026-03-14 03:41:27 +01:00
fix: resolve search behavior when cursor is not at top of list
- Fix search mode not triggering properly after navigation - Preserve cursor position during filtering operations - Add comprehensive UI tests for search functionality - Improve search to include user field filtering
This commit is contained in:
@@ -57,6 +57,12 @@ func (m Model) filterHosts(query string) []config.SSHHost {
|
||||
continue
|
||||
}
|
||||
|
||||
// Check the user
|
||||
if strings.Contains(strings.ToLower(host.User), query) {
|
||||
filtered = append(filtered, host)
|
||||
continue
|
||||
}
|
||||
|
||||
// Check the tags
|
||||
for _, tag := range host.Tags {
|
||||
if strings.Contains(strings.ToLower(tag), query) {
|
||||
|
||||
Reference in New Issue
Block a user