Richard Russon [Sun, 9 Apr 2017 19:43:22 +0000 (20:43 +0100)]
merge: upstream fixes (mutt/default)
* Remove redraw flag setting after mutt_endwin().
* Change km_dokey() to pass SigWinch on for the MENU_EDITOR. (see #3877)
* Separate out the compose menu redrawing. (see #3877)
* Separate out the index menu redrawing. (see #3877)
* Prepare for pager redraw separation. (see #3877)
* Separate out the pager menu redrawing. (see #3877)
* Don't create query menu until after initial prompt. (see #3877)
* Silence imap progress messages for pipe-message. (see #3929)
* Ensure mutt stays in endwin during calls to pipe_msg() (closes #3929)
Kevin McCarthy [Sat, 8 Apr 2017 21:21:15 +0000 (14:21 -0700)]
Ensure mutt stays in endwin during calls to pipe_msg() (closes #3929)
The previous commit solved the problem reported in #3929: progressbar
output while downloading a message via IMAP was refreshing the mutt
ncurses session after launching the pipe program.
To ensure another place in the code doesn't inadvertantly generate
output, wrap OPTKEEPQUIET around the calls to
pipe_msg()/mutt_wait_filter() too.
Kevin McCarthy [Sat, 8 Apr 2017 21:18:26 +0000 (14:18 -0700)]
Silence imap progress messages for pipe-message. (see #3929)
_mutt_pipe_message() calls endwin(), and then calls pipe_msg(). If an
imap message body hasn't already been downloaded, this can end up
calling imap_fetch_message().
The progress messages in imap_fetch_message() were restoring curses,
just after extract_url was running. This was leading to a condition
where mutt curses didn't think the screen had changed after
extract_url exited.
There was already a check for isendwin() inside imap_fetch_message(),
but it wasn't wrapped around the progressbar creation/usage. Add a
check for those places too.
Kevin McCarthy [Wed, 5 Apr 2017 23:09:39 +0000 (16:09 -0700)]
Don't create query menu until after initial prompt. (see #3877)
A resize in the prompt will trigger a redraw, but the data won't be
loaded yet, displaying a blank screen instead of the previous menu.
Once the query is done, the data is loaded, but the menu->redraw state
has been changed by the resize.
We could manually flag a redraw, but it makes more sense visually
logically to just create the menu after the query and results are
loaded.
Richard Russon [Sun, 2 Apr 2017 01:31:28 +0000 (02:31 +0100)]
merge: upstream fixes (mutt/default)
* Fix mutt_refresh() pausing during macro events.
* Add a menu stack to track current and past menus.
* Change CurrentMenu to be controlled by the menu stack.
* Set refresh when popping the menu stack.
* Remove redraw parameter from crypt send_menus.
* Don't full redraw the index when handling a command from the pager.
* Filter other directional markers that corrupt the screen.
* Remove the OPTFORCEREDRAW options.
* Remove SidebarNeedsRedraw.
* Change reflow_windows() to set full redraw.
* Create R_MENU redraw option.
* Remove refresh parameter from mutt_enter_fname().
Kevin McCarthy [Sat, 1 Apr 2017 01:15:31 +0000 (18:15 -0700)]
Remove refresh parameter from mutt_enter_fname().
Also remove it from mutt_save_message(), which used it to pass through
to mutt_enter_fname(). The callers of this already had redraw logic,
to which REDRAW_STATUS merely needed to be added.
Kevin McCarthy [Sat, 1 Apr 2017 01:15:28 +0000 (18:15 -0700)]
Create R_MENU redraw option.
Previously, the R_INDEX option meant both the index as well as all
other menus. The removal of the OPTFORCEREDRAWINDEX option caused problems
with redrawing other menus for options such as arrow_cursor.
One solution would be change R_INDEX back to meaning "everything"
except pager, but there are only a handful of options that affect
other menus.
Instead, create R_MENU to indicate options that affect either all
menus or one of the other menus beside the index and pager.
Kevin McCarthy [Mon, 27 Mar 2017 01:31:43 +0000 (18:31 -0700)]
Remove redraw parameter from crypt send_menus.
The parameter was used to notify the caller if the sign (a)s menu was
invoked, which displayed the key selection menu. This is no longer
necessary with the menu stack pop operation.
Kevin McCarthy [Mon, 27 Mar 2017 01:31:41 +0000 (18:31 -0700)]
Set refresh when popping the menu stack.
This removes the need for the OPTNEEDREDRAW option and MAYBE_REDRAW
macro previously used to communicate back the need to refresh after
exiting a menu.
Remove the redraw parameter from ci_bounce_message() and
mix_make_chain() which served the same purpose.
Kevin McCarthy [Sun, 26 Mar 2017 19:27:15 +0000 (12:27 -0700)]
Fix mutt_refresh() pausing during macro events.
Changeset a07e8215a0ef split input buffering into two pools.
Unfortunately, the mutt_refresh() was not changed to check the correct
buffer count, resulting in unnecessary refreshes during macros.
The SSL interactive certificate prompts set OPTIGNOREMACROEVENTS and
then put up a confirmation menu. Perhaps we've just been lucky, but
it seems we should refresh the screen in those cases if we're in the
middle of a macro. Add a check for this option in mutt_refresh() too.
Richard Russon [Wed, 22 Mar 2017 16:44:02 +0000 (16:44 +0000)]
merge: Tidy the code - Part 2
* build: force OPS to be rebuild after a reconfigure
* build: fix minor code warnings / style
* tidy: be specific about void functions
* build: expand a few more alloc macros
* tidy: add argument names to function prototypes
* build: drop local copy of regex code
* tidy: indent the docbook manual
* tidy: rearrange code to avoid forward declarations
* tidy: limit the scope of some functions
* build: give the compress functions a unique name
* tidy: use snake_case for function names
* build: add missing newlines to mutt_debug
Richard Russon [Thu, 16 Mar 2017 02:35:05 +0000 (02:35 +0000)]
build: give the compress functions a unique name
The compressed mailbox functions are passed as pointers to mutt.
Their names, e.g. "open_mailbox" are OK for compilation, but they are
ambiguous when debugging.