diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-01-19 14:52:22 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-01-26 11:18:06 +0100 |
commit | f226a277bf58c71d8ba698cafba3605126587f74 (patch) | |
tree | 4e337fa39da6da4448f3094f5e95ff28675df3e6 /pkg | |
parent | cce29209be16f30c3863898fda91e98fab61f945 (diff) |
Rename MinMax to SortRange
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/context/traits/list_cursor.go | 2 | ||||
-rw-r--r-- | pkg/utils/utils.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/context/traits/list_cursor.go b/pkg/gui/context/traits/list_cursor.go index 368485c05..4e74019ca 100644 --- a/pkg/gui/context/traits/list_cursor.go +++ b/pkg/gui/context/traits/list_cursor.go @@ -128,7 +128,7 @@ func (self *ListCursor) AreMultipleItemsSelected() bool { func (self *ListCursor) GetSelectionRange() (int, int) { if self.IsSelectingRange() { - return utils.MinMax(self.selectedIdx, self.rangeStartIdx) + return utils.SortRange(self.selectedIdx, self.rangeStartIdx) } return self.selectedIdx, self.selectedIdx diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index ae876568f..053b7ac2f 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -50,7 +50,7 @@ func Max(x, y int) int { return y } -func MinMax(x int, y int) (int, int) { +func SortRange(x int, y int) (int, int) { if x < y { return x, y } |