[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix up/down arrow keys selection after filtering

Kasper (Jun 26, 2025, 12:58 AM +0200) b7ef3713 0e84c741

+16 -3
+1
CHANGELOG.md
··· 2 2 3 3 ## Next 4 4 - Fix scrolling not happening when using arrow keys 5 + - Fix up/down arrow keys selecting incorrectly after filtering 5 6 - Fix file errors not clickable 6 7 7 8 ## 0.19.7 - 2025 Jun 6
+15 -3
src/lib/selection.ts
··· 44 44 this.items.delete(item) 45 45 } 46 46 } 47 - if (this.last_added !== null && !this.items.has(this.last_added.item)) { 48 - this.last_added = null 47 + if (this.last_added !== null) { 48 + if (this.items.has(this.last_added.item)) { 49 + const index = this.all.indexOf(this.last_added.item) 50 + this.last_added = { index, item: this.last_added.item } 51 + } else { 52 + this.last_added = null 53 + } 49 54 } 50 55 if (this.shift_anchor !== null && !this.items.has(this.shift_anchor.item)) { 51 - this.shift_anchor = null 56 + if (this.items.has(this.shift_anchor.item)) { 57 + const index = this.all.indexOf(this.shift_anchor.item) 58 + this.shift_anchor = { index, item: this.shift_anchor.item } 59 + } else { 60 + this.shift_anchor = null 61 + } 52 62 } 53 63 } 54 64 ··· 186 196 } else if (this.items.size === 0) { 187 197 this.add_index_unchecked(0) 188 198 } else if (this.last_added !== null) { 199 + console.log('go_forward', { ...this }) 189 200 const next_index = this.last_added.index + 1 190 201 this.clear() 191 202 this.add_index_unchecked(Math.min(next_index, this.all.length - 1)) 203 + console.log('.', { ...this }) 192 204 } 193 205 } 194 206 /** Expand or shrink selection backwards (shift+up) */