Sebastian Stark [Sun, 26 May 2019 08:04:58 +0000 (10:04 +0200)]
make OP_HALF_{UP,DOWN} behave symmetric.
- the calculation of number of lines to scroll up/down should not
depend on whether the number of rows in the pager/index/terminal is
odd or even.
- this patch will make the behaviour symmetric such that in both cases
(even/odd number of rows) scrolling up and down by half a page (or the
other way round) will get you back to the exact same line as before.
Austin Ray [Wed, 22 May 2019 20:40:03 +0000 (16:40 -0400)]
fix: stop CUR_EMAIL underflow in entire-thread
entire-thread will underflow CUR_EMAIL macro if no mailbox is
configured. To prevent this, call 'prereq()' before any other logic.
'prereq()' will ensure we have a mailbox thus preventing the underflow.
flatcap deserves credit for identifying the solution.
Richard Russon [Thu, 23 May 2019 11:33:38 +0000 (12:33 +0100)]
merge: Convert Address to use TAILQ
* Define an AddressList structure using TAILQ
* Add functions to convert to/from Address/AddressList
* Use AddressList in mutt_addrlist_dedupe
* Use AddressList in mutt_addr_parse_list
* Const'ify parameter to mutt_addr_copy
* Implement mutt_addresslist_new
* Use AddressList in mutt_addr_copy_list
* Use AddressList in mutt_addr_free, implement mutt_addresslist_free_one
* Use AddressList in mutt_addr_remove_from_list
* Use AddressList in mutt_addr_qualify
* Use AddressList in mutt_addr_append
* Use AddressList in mutt_addr_cmp_strict
* Use AddressList in mutt_addr_has_recips
* Use AddressList in mutt_addr_search
* Use AddressList in mutt_addr_remove_xrefs
* Tidy Address free'ing functions
* Use AddressList in mutt_addr_write
* Use AddressList in mutt_addrlist_to_intl and mutt_addrlist_to_local
* Convert mutt_addr_remove_from_list and mutt_addr_remove_xrefs API to AddressList
* Convert Alias to use AddressList
* Convert Envelope addresses to AddressList
* Fix variadic function
* Fix recursive alias lookup
* Cleanup Address API: mutt_addr_cmp_strict -> mutt_addresslist_equal
* Cleanup Address API: parse and free
* Cleanup Address API: mutt_addresslist_qualify
* Cleanup Address API: mutt_addr_write
* Fix and refactor mutt_is_list_recipient and mutt_is_subscribed_list_recipient
* Fix match_user
* Cleanup Address API: unexpose mutt_addr_is_(intl|local)
* Cleanup Address API: unexpose mutt_addr_mbox_to_udomain
* Cleanup Address API: mutt_addr_remove_from_list -> mutt_addresslist_remove
* Cleanup Address API: mutt_addr_remove_xrefs -> mutt_addresslist_remove_xrefs
* Cleanup Address API: unexpose mutt_addr_set_(intl|local)
* Cleanup Address API: mutt_addrlist_dedupe -> mutt_addresslist_dedupe
* Cleanup Address API: mutt_addrlist_to_(intl|local) -> mutt_addresslist_to_(intl|local)
* Remove "next" pointer from struct Address: conversion to TAILQ is complete
* Merge AddressNode into Address
* Rename mutt_addresslist_* to mutt_addrlist_*
* Provide mutt_addrlist_append and mutt_addrlist_prepend
* doxy: fix comments
* test: update basic address tests
* remove 'mutt_' from static functions
* Add tests for mutt_addr_cmp
* Add tests for mutt_addr_cat, explain what it does does in the Doxygen block
* Add tests for mutt_addr_copy
* Add tests for mutt_addr_free
* Add tests for mutt_addr_valid_msgid
* Add test for mutt_addrlist_append and mutt_addrlist_prepend
* Add tests for mutt_addrlist_copy
* Add test for mutt_addrlist_dedupe, fix mutt_addrlist_parse
* Run clang-format over test/address
* Add tests for mutt_addrlist_equal
* Add tests for mutt_addrlist_free_all
* Add tests for mutt_addrlist_free_one
* Add tests for mutt_addrlist_free
* Boolify uses of Address' group
* tidy code
* Revert queue.h formatting
* Rename mutt_addrlist_has_recips to mutt_addrlist_count_recips and add tests
* Kill duplicate copyright line
* Rename mutt_addrlist_free_all into mutt_addrlist_clear, remove freeing functions
* Add tests for mutt_addrlist_count_recips
* Add tests for mutt_addrlist_parse + slight refactor and fix return value
* Slightly refactor mutt_addrlist_parse2
* Avoid leak in the test for mutt_addrlist_parse
* Add tests for mutt_addrlist_parse2
* Add tests for mutt_addrlist_qualify
* Sort address functions by name
* Add helper to create and populate an Address, avoid leaks in tests
* Simplify mutt_default_from
* Add tests formutt_addrlist_remove_xrefs
* Add tests for mutt_addrlist_remove
* Add (basic) tests for mutt_addrlist_to_(intl|local)
* Add tests for mutt_addrlist_write + make it more readable
* Fix test for mutt_addrlist_write and avoid leak
* Add mutt_addr_to_local
* Test addresses with comments in mutt_addrlist_parse
* Run clang-format over test/address