Lua primitives: maildir_offset()
When in maildir mode, set with global_mode, the user interface consists of a list of maildir folders.
The maildir_offset() function allows you to learn the current position of the selected folder.
The offset will range from 0 to count_maildirs().
-- Iterate over every maildir from the current position to the end of the list. function do_stuff() i = index_offset(); while( i < count_maildirs() ) jump_maildir_to( i ) -- do stuff i = i + 1 end end
This function has been available since version 0.18.