Lua primitives: count_messages()
When in index mode, set with global_mode, the user interface consists of a list of messages.
This function will count the number of messages which are visible.
For example this can be used to mark all messages read:
-- -- Mark all messages in the currently selected folder(s) as read. -- function mark_all_read() count = count_messages() i = 0 while( i < count ) do jump_index_to( i ) mark_read() i = i + 1 end end
This function has been available since version 0.07.