mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'master' into zendeskhelp
This commit is contained in:
commit
521687e0a4
@ -7,6 +7,7 @@ builds:
|
|||||||
goos:
|
goos:
|
||||||
- darwin
|
- darwin
|
||||||
- linux
|
- linux
|
||||||
|
- windows
|
||||||
goarch:
|
goarch:
|
||||||
- 386
|
- 386
|
||||||
- amd64
|
- amd64
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
### ⚡️ Added
|
### ⚡️ Added
|
||||||
|
|
||||||
* DataDog module is now scrollable and interactive, by [@Seanstoppable](https://github.com/Seanstoppable)
|
* DataDog module is now scrollable and interactive, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||||
|
* Focusable hot key numbers are now assigned in a stable order, [#435](https://github.com/wtfutil/wtf/issues/435) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||||
|
|
||||||
## v0.9.2
|
## v0.9.2
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package wtf
|
package wtf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/olebedev/config"
|
"github.com/olebedev/config"
|
||||||
"github.com/rivo/tview"
|
"github.com/rivo/tview"
|
||||||
)
|
)
|
||||||
@ -177,6 +179,17 @@ func (tracker *FocusTracker) focusables() []Wtfable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort for deterministic ordering
|
||||||
|
sort.SliceStable(focusable[:], func(i, j int) bool {
|
||||||
|
if focusable[i].Top() < focusable[j].Top() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if focusable[i].Top() == focusable[j].Top() {
|
||||||
|
return focusable[i].Left() < focusable[j].Left()
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
|
||||||
return focusable
|
return focusable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user