Lumail - The console email client


Lua primitives: maildir_offset()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

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().

For example:

-- 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

Availability

This function has been available since version 0.18.

See Also

See also jump_maildir_to, scroll_maildir_down, scroll_maildir_up, select_maildir.