diff options
| author | raven <citrons@mondecitronne.com> | 2026-02-17 16:41:28 -0600 |
|---|---|---|
| committer | raven <citrons@mondecitronne.com> | 2026-02-17 16:41:28 -0600 |
| commit | 7b3792369672ea758fd6e89ce80fa0de49737bad (patch) | |
| tree | b16778ab4d9f807495c30a4df1d1d54bbb574fbf /client/channel_list.go | |
| parent | e85058daf7019777ac017a84253298390bcf2745 (diff) | |
alt+arrow navigation through DM list
Diffstat (limited to 'client/channel_list.go')
| -rw-r--r-- | client/channel_list.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/channel_list.go b/client/channel_list.go index 2c7c51c..cfb1ec4 100644 --- a/client/channel_list.go +++ b/client/channel_list.go @@ -91,7 +91,12 @@ func (cl *channelList) remove(location channelLocation) { } func (cl *channelList) traverse(direction int) int { - next := 0 + var next int + if direction >= 0 { + next = 0 + } else { + next = len(*cl) - 1 + } for i := 0; i < len(*cl); i++ { if (*cl)[i].location == globalApp.currentWindow { next = i + direction |
