Age | Commit message (Collapse) | Author |
|
These are the errors output with:
-Werror=implicit-int -Werror=implicit-function-declaration
-Werror=int-conversion -Werror=strict-prototypes
-Werror=old-style-definition
|
|
This will prevent an unneeded double-refresh after an endwin() when we
set SigWinch in the next commit.
In the pager, change RETWINCH handling to account for a sigwinch while
in the handler. Previously a redraw would occur and use/free the
Resize data, but since the SigWinch check now occurs before the
redraw, keep existing data.
|
|
A setting change or window resize could take place in the called menu,
which will require reflowing the pager when returning to it.
When converting to the menu stack, I left in manual REDRAW_FULL redraw
assignments, to be cautious and because it wasn't causing an problems.
However, with the REDRAW_FLOW added, the pager menu needs to have
those assignments removed after a menu call.
|
|
This fixes problems with a sigwinch that occurs during an external
process, such as during a query menu lookup, or after exiting the
background-edit landing page. Without this change, the user would see
a misdrawn screen and would need to press a key first.
Change it so that the SigWinch flag is handled before reading input,
so that the page is automatically redrawn. This matches the behavior
in the index, pager, and background-edit process list menu.
|
|
This function allows more usable color pairs, because it passes the
pair parameter separately. The COLOR_PAIR() macro only returns 8-bits
for a pair, limiting the total pairs used to 256 despite many systems
having much larger COLOR_PAIRS values.
In order to do this, separate out the pair and attrs values, instead
of combining attr + COLOR_PAIR(pair) into a single value and storing
that inside Mutt. For the older calls, bkgdset() and attrset(), we
call COLOR_PAIR() at the last minute.
Add COLOR_ATTR to header cache sum calculation, since it is used in
the HEADER now.
|
|
* Remove the automatic conversion of NULL and '\0' to 0. Add a flag
for the cases that require lax evaluation.
* Make trailing characters generate an error by default for the
mutt_atouX functions. Add a flag for that case. Most of the IMAP
code parses numbers out of a stream, so add the flag to those
calls.
* The mutt_atouX functions were also behaving incorrectly with
invalid input, e.g. "ABC", returning and setting 0. Fix them to
return an error in those cases.
* Add a mutt_atoll() function, to be used in the next commit.
* Change converters to store 0 on error. atos, atoi, and atoui were
already doing this, but the others were not.
|
|
Commit e2a28006 moved the cur_color assignment so that $arrow_cursor
could also use the value for overlays.
Unfortunately, it at the same time moved the call *after* the call to
mutt_window_move(), which would introduce a drawing bug if
menu->color() went across IMAP.
The previous commit removed overlays for $arrow_cursor, also removing
the need for cur_color to be assigned for both. Move it back to where
it was before.
|
|
It is called by main menu drawing routines and contains its own
conditional coloring of a tree component. As is, everything in there
gets overwritten by the indicator. Furthermore, do_color parameter
specifically disables any coloring in order for indicator highlight to
overwrite everything else.
We need to merge three colors here:
1) index color;
2) tree color, that is drawn within menu using its own color;
3) indicator color, that, if active, is drawn over both of them.
Combining these colors is implemented in that order.
After some testing, I think it doesn't make sense to merge colors when
$arrow_cursor is on. This part is reverted to the original behavior.
Make print_enriched_string() coloring behavior self-contained, instead
of assuming the proper base_color is already set. This makes the
callers simpler and allows them to only handle $arrow_cursor logic.
|
|
Although I think the new behavior is desirable, experience has shown
that changes need to be controlled by an option and usually defaulting
the same as before.
|
|
Currently, when the indicator line is over an unread message, full
indicator color definition is used, and the line is no longer
displayed bold. It's harder to notice when using default reverse style
for the indicator, but it becomes much more prominent when you have
black on white display and only subtle change in the indicator
background.
We could improve this by merging indicator color definition with color
definition of the underlying menu item. Here is how it's done:
1. First color definitions for the indicator and underlying menu item
are taken and split back to foreground, background and attributes
(meaning bold, underline, etc.).
2. If indicator does not specify foreground or background color, new
color pair is created by using underlying menu item as base. Else
indicator's own foreground and background are used (current behavior).
3. Then attributes of both colors are combined together. For example,
if indicator has 'underline' and menu item has 'bold' result will be
highlighted as 'bold underline'.
4. The resulting color is used in place of MT_COLOR_INDICATOR when
highlighting things in menu.c.
Combining attributes this way makes sense to me, because indicator is
meant to _indicate_, meaning increasing information density. It also
looks better when moving through the list containing differently
styled items.
This patch affects indicator, sidebar_highlight, and sidebar_indicator
color objects.
|
|
List the backgrounded sessions. Allow the user to resume one, or exit
the menu.
Bind to 'B' by default in the index and pager menus.
Remove the "<mail>" function autoresuming functionality, instead
invoke the menu to resume backgrounded sessions.
|
|
The auto-clearing code was added in commit 01bc088c, for autocrypt
initial prompting. It removed having to keep track of every place a
browser or other menu might be displayed and having to remember to
clear it out.
However, clearing when mutt exits is a change of behavior for those
who have turned off alternative screens.
|
|
Reset the SigWinch flag before the screen resize/reflow, not afterwards.
|
|
This removes the need to manually clear the screen during pre-menu
operations, such as autocrypt first run initialization.
|
|
Remove the manual max calculation and dialog row allocation.
Add a NONULL check because the helper uses safe_strdup() to add a row.
|
|
These are mostly automated changes corresponding to the emacs
settings:
(c-set-style "linux")
(setq c-basic-offset 2)
(c-set-offset 'case-label '+)
Most of the code follows the convention:
(add-to-list 'c-cleanup-list 'space-before-funcall)
but this is not enforced by this indentation cleanup.
Also, I personally dislike tabs, so I have:
(setq-default indent-tabs-mode nil)
in my own configuration. However I have no desire to change every line
just for that effect. So this cleanup does nothing about the mix issue.
Some of the secondary files (e.g. regex.c) have been skipped.
I've also skipped crypt-gpgme.c, because I need to think about that
file. Werner Koch and the GnuPG team contributed most it, and it
follows the Gnu indentation settings. It should probably be made
uniform with Mutt, but I don't want to discourage future GnuPG
contribution to the file.
I manually reverted a few unsightly cleanups, and added a few tweeks
when I saw things that could be improved.
|
|
The result of
find . -name "*.[ch]" -exec emacs -batch {} \
--eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
|
|
This allows the statistics to be updated without setting
$mail_check_stats or before $mail_check_stats_interval has passed.
|
|
The inotify handler now returns -2 (timeout) on a new mail event.
Change the direct callers to ignore, so prompts aren't strangely
aborted.
Also, fix mutt_change_flag() to call mutt_refresh() before the
prompt. Apparently ncurses getch() was doing this for us, but now
that we are polling STDIN instead, the prompt wasn't displaying.
|
|
<error-history>, by default unbound, shows a list of the recent error
messages displayed by Mutt via mutt_message() or mutt_error().
$error_history sets the size of the history ring.
For now, I've decided to include mutt_message() messages too. If this
is too chatty, we can restrict it to mutt_error() easily in the
future.
|
|
|
|
It is possible for menu->color() to end up fetching an imap message,
and therefore generating a status message.
Because of this, we need to make those calls before we position the cursor.
|
|
If $timeout is set very low, then it can cancel the tag-prefix before
the user has time to press the desired command.
Change the code to set the tag flag, and then recontinue with normal
event processing instead. Cancel on an abort, but continue with a timeout.
Thanks to Lauri Tirkkonen for reporting the issue.
|
|
In some cases, such as tag-prefix or _mutt_enter_string(), it is
desirable to be able to distinguish between a timeout/sigwinch event
and an input error/abort/ctrl-g.
|
|
Use this for $header_color_partial, $markers, and $smart_wrap. When
these options are changed in the pager, this flag will force a
recalculation of lineInfo.
Remove the manual checks in OP_ENTER_COMMAND for $markers and
$smart_wrap, and instead use the same REDRAW_FLOW processing used for
a SigWinch.
|
|
With the ability to set redraw flags with the menu stack operations,
some operations internally modify the current menu redraw flag.
For instance, _mutt_set_flag() can now set REDRAW_SIDEBAR.
Change the ops that modify messages to use 'redraw |= REDRAW_X'
instead of overwriting the flag value.
|
|
Add a custom_menu_redraw to the menu and change menu_redraw() to call
that instead if set.
|
|
Change _mutt_enter_string() to pass the SigWinch through for
_mutt_get_field() or mutt_enter_string() to handle.
Add a call to mutt_current_menu() in _mutt_get_field() to properly
redisplay the screen in that case.
|
|
The menu stack can be used to flag a redraw of the sidebar window.
|
|
Use the menu stack to flag redraws for the index and pager.
|
|
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.
|
|
The pager menu is a bit tricky with respect to the menu->menu and
CurrentMenu, so add a few comments.
|
|
Change the pager to use a MENU, right now just to hold the refresh
state.
|
|
Also, remove unused sb_init declaration.
|
|
Fix the autoconf/makefile.am changes to be consistent.
Create a global SidebarNeedsRedraw to indicate a redraw is needed,
instead of putting sb_draw() everywhere in the code.
Create a menu_redraw_sidebar() function and use the REDRAW_SIDEBAR
flag instead of piggy-backing it inside the index loop.
Fix curs_main.c and pager.c to be a bit cleaner by using the global and
REDRAW_SIDEBAR.
Start to clean up some of the buffy code, but this needs to refactored
and fixed.
|
|
This is the patch from neomutt; branch 'devel/win-sidebar'; commit
c796fa85f9cacefb69b8f7d8545fc9ba71674180 with the following changes:
- move the sample muttrc and vimrc to contrib.
- remove the README.sidebar.
- empty out the PATCHES file.
|
|
Changeset 23334e967dd7 created a workaround for a namespace conflict
with Solaris and derivatives. After some discussion, the team decided
it would be best to move away from using the "M_" prefix for macros.
This patch was automatically generated by running:
perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`
with the exception that sys_socket.h was exempted. (That file will
be backed out subsequent to this commit.)
Thanks to Andras Salamon for supplying the perl script used to make
this change.
|
|
Change menu.c to use the mutt_window_t structures and functions. The
index/stats/help/message window pointers are stored inside the menu_t.
This is useful for the pager, where the "index" we want to use is a
mini-index.
|
|
Currently, the SSL and TLS certficate prompts turn on
OPTUNBUFFEREDINPUT, (to prevent macros and such from running right
through the dialog). Unfortunately, the menu dialog processing in
menu_dialog_dokey() is using mutt_ungetch() to forward non-dialog keys
on to standard menu processing. With OPTUNBUFFEREDINPUT set, those keys
never make it to the menu and are buffered until after the menu dialog.
This patch creates a new event buffer, separate from the standard
"unget" buffer, for use by macros, exec, and push events. These events
can be temporarily ignored by setting OPTIGNOREMACROEVENTS (renamed
from OPTUNBUFFEREDINPUT), while continuing to allow unget events to be
processed.
Since the "push" and "unget" functions now go to different buffers,
function names were slightly renamed, to make it less easy to
unintentionally use the wrong function at the wrong time.
|
|
The menu type is used in several places as a direct index into
Keymaps[], so passing in -1 to mutt_new_menu() was leading to illegal
memory accesses later on.
Add a range check in mutt_new_menu(), defaulting to MENU_GENERIC, to
prevent this problem in the future.
|
|
attrset() when we don't.
closes #3005
|
|
|
|
has the same decl.
|
|
when linking against ncursesw.
This patch is based on http://prefix.gentooexperimental.org:8000/mutt-patches/file/fea851a2808f/solaris-ncurses-chars.patch
|
|
The content of the regex_t structure is undefined in this case.
|
|
|
|
The pager had the fall-through to search, so for
consistency do that in other menues as well.
|
|
I went through the logs of each file with a copyright header and
updated the years for the authors in the headers for any non-comment
changes they introduced. What a pain!
|
|
Previously, the pattern was thrown away during menu destruction.
For the next search, mutt then can't provide a good suggestion.
The new behaviour is to manage the pattern outside the lifecyle
to always provide the last pattern as suggestion.
|
|
|