summaryrefslogtreecommitdiff
path: root/client/channel_list.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/channel_list.go')
-rw-r--r--client/channel_list.go7
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