diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/statusline/folderstate.go | 4 | ||||
-rw-r--r-- | lib/statusline/state.go | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/statusline/folderstate.go b/lib/statusline/folderstate.go index 50a8c82b..ff470b72 100644 --- a/lib/statusline/folderstate.go +++ b/lib/statusline/folderstate.go @@ -4,6 +4,7 @@ type folderState struct { Search string Filter string FilterActivity string + Sorting string Threading string } @@ -21,6 +22,9 @@ func (fs *folderState) State() []string { if fs.Search != "" { line = append(line, fs.Search) } + if fs.Sorting != "" { + line = append(line, fs.Sorting) + } if fs.Threading != "" { line = append(line, fs.Threading) } diff --git a/lib/statusline/state.go b/lib/statusline/state.go index fe32626a..895bb2c4 100644 --- a/lib/statusline/state.go +++ b/lib/statusline/state.go @@ -109,6 +109,15 @@ func Search(desc string) SetStateFunc { } } +func Sorting(on bool) SetStateFunc { + return func(s *State, folder string) { + s.folderState(folder).Sorting = "" + if on { + s.folderState(folder).Sorting = "sorting" + } + } +} + func Threading(on bool) SetStateFunc { return func(s *State, folder string) { s.folderState(folder).Threading = "" |