diff options
author | Jelle Besseling <jelle@pingiun.com> | 2019-08-04 16:05:06 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-07 15:02:11 +0900 |
commit | 3650b72ca64b9fb6a7e7b058ad6ef67894c2866d (patch) | |
tree | 1833f2166b90bf1ef88f1b7415cdd889b7c2bca4 /widgets | |
parent | 1f6c108c0412a03bfadd01ac81607e76ecbcd2d7 (diff) | |
download | aerc-3650b72ca64b9fb6a7e7b058ad6ef67894c2866d.tar.gz |
Implement next-folder using NextPrev with amount
This fixes ~sircmpwn/aerc2#182 https://todo.sr.ht/~sircmpwn/aerc2/182
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/dirlist.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 078973a..b0807ae 100644 --- a/widgets/dirlist.go +++ b/widgets/dirlist.go @@ -136,7 +136,7 @@ func (dirlist *DirectoryList) Draw(ctx *ui.Context) { } } -func (dirlist *DirectoryList) nextPrev(delta int) { +func (dirlist *DirectoryList) NextPrev(delta int) { curIdx := sort.SearchStrings(dirlist.dirs, dirlist.selected) if curIdx == len(dirlist.dirs) { return @@ -152,11 +152,11 @@ func (dirlist *DirectoryList) nextPrev(delta int) { } func (dirlist *DirectoryList) Next() { - dirlist.nextPrev(1) + dirlist.NextPrev(1) } func (dirlist *DirectoryList) Prev() { - dirlist.nextPrev(-1) + dirlist.NextPrev(-1) } // filterDirsByFoldersConfig sets dirlist.dirs to the filtered subset of the |