1. 04 Jan, 2019 1 commit
    • Kevin J. McCarthy's avatar
      Clean up code indentation. · 248c2ee8
      Kevin J. McCarthy authored
      These are mostly automated changes corresponding to the emacs
        (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.
  2. 01 Jan, 2019 1 commit
    • Kevin J. McCarthy's avatar
      Remove trailing whitespace. · 443295ee
      Kevin J. McCarthy authored
      The result of
        find . -name "*.[ch]" -exec emacs -batch {} \
          --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
  3. 31 Dec, 2018 2 commits
    • Kevin J. McCarthy's avatar
      Remove unused MUTT_FORMAT_MAKEPRINT flag. · 1c59c271
      Kevin J. McCarthy authored
      The code in mutt_FormatString() that was using it was commented out 19
      years ago.
    • Kevin J. McCarthy's avatar
      Remove dead code. · 3aa8d8a0
      Kevin J. McCarthy authored
      Most of these have been "#if 0" out for 10-20 years.  Any utility in
      keeping them around is miniscule at this point.
      There are a few other "#if 0" in the code, but I've kept them for now.
      Some are utility functions that are not used, but I think still may
      have some documentation value.
  4. 29 Dec, 2018 1 commit
  5. 26 Nov, 2018 1 commit
  6. 25 Nov, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Switch color chunk matching to use bsearch. · f4f20e5d
      Kevin J. McCarthy authored
      Emails with extremely long lines, combined with a large number of
      color matches, can cause a performance hit so severe that mutt appears
      to have hung.
      Switching out to using a binary search speeds things up noticably.
      The for loops being replaced were a bit strange.  resolve_types()
      ensures there are no overlaps, and that they are ordered.  A match is
      defined by (first <= cnt < last).  I can't see any reason for the
      strange comparison of (cnt > last) follow by (cnt != last).  Perhaps
      at one time it made sense.
  7. 16 Oct, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Remove conversion of nbsp to space. · dd1e0ea4
      Kevin J. McCarthy authored
      Keep the behavior of it not line-breaking, but don't change it to a
      space character when displaying.  This is so copy-paste from the pager
      will preserve the nbsp, which is semantically important in some
  8. 22 Aug, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Add compose-to-sender functionality. · 32734a9f
      Kevin J. McCarthy authored
      This patch is loosely based on the NeoMutt feature, but adds in
      support for the attach menu, reuses functionality in send.c, and has
      proper mode checks.
      Thanks to Enno for the opening the ticket requesting the port.
  9. 14 Aug, 2018 2 commits
    • Kevin J. McCarthy's avatar
      Remove legacy trim_incomplete_mbyte() in the pager. · 5ce9030c
      Kevin J. McCarthy authored
      Commit 4b1deb57 added the trim_incomplete_mbyte() call, but at
      that time, the function was using fgets() into a fixed-sized
      buffer.  The function was passing in "blen - 1" to the size
      parameter of fgets, so the check for blen-2 was to see if the
      buffer was completely filled by the fgets.
      Commit d39d9c0c converted to use a dynamic buffer, but the
      trim_incomplete_mbyte() was left in.  It now serves no purpose
      because the entire line will be read in.  Presumably the buggy
      regexp lib should have been fixed by now too.
    • Kevin J. McCarthy's avatar
      Refactor out mutt_is_quote_line(). · a1cf2012
      Kevin J. McCarthy authored
      This makes resolve_types() a tiny bit clearer, and will be usable by
  10. 29 Jun, 2018 1 commit
  11. 01 Jun, 2018 1 commit
  12. 22 Apr, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Add Error History function and config var. · 26b82202
      Kevin J. McCarthy authored
      <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
  13. 19 Nov, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Fix ansi escape sequences with both reset and color parameters. (closes #3689) · 3ccd1990
      Kevin J. McCarthy authored
      The initial 0 "reset/normal" was setting attr = ANSI_OFF, which was
      subsequently being or'ed with ANSI_COLOR.
      The color resolution was then checking for the ANSI_OFF bit and
      turning all coloring off, even though ANSI_COLOR was also set.
      Change the color resolution to check for "attr == ANSI_OFF" instead, so
      the color isn't reset unless the reset occurs last in the sequence.
  14. 15 Nov, 2017 2 commits
    • Kevin J. McCarthy's avatar
      Remove useless else branch in the $smart_wrap code. (see #3857) · 78d2c197
      Kevin J. McCarthy authored
      Thanks to Vincent Lefèvre for noticing the nested else was redundant,
      since buf_ptr is already set to "buf + cnt" after the format_line()
      This allows us to merge the inner and outer if statement, resulting in
      simpler code.
    • Kevin J. McCarthy's avatar
      Fix $smart_wrap to not be disabled by whitespace-prefixed lines. (closes #3857) · b3940ed4
      Kevin J. McCarthy authored
      changeset:737102af74eb fixed a folded header display issue with $smart_wrap
      by disabling $smart_wrap for lines beginning with whitespace.
      Unfortunately, this turns off smart wrapping in the body of an email
      too, even when the line has other whitespace breaks in it.
      An earlier commit, changeset:125076e0fdfa added an infinite loop fix
      when MUTT_PAGER_NSKIP is set, by disabling the smart_wrap if the space
      backtracking went to the beginning of the line.  That is, a line
      beginning with 1+ whitespace followed by a single long word.
      Extend this second commit by always disabling the smart_wrap in that
      case, not just when MUTT_PAGER_NSKIP is set.  This also solves the
      folded header issue without other side effects.
  15. 11 Aug, 2017 2 commits
    • Kevin J. McCarthy's avatar
      Fix shared attachment functions. (see #3728) · 2a735859
      Kevin J. McCarthy authored
      With nested decryption, the correct FP is associated with the
      ATTACHPTR entry.  Also, the BODY entries are not continguous, so the
      functions need to iterate over the actx index, not the BODY structure.
    • Kevin J. McCarthy's avatar
      Change helpers functions to pass actx. (see #3728) · 3433587a
      Kevin J. McCarthy authored
      Change the pager, compose, recvattach and recvcmd to pass the actx
      instead of the individual idx and idxlen parameters.
      Separate out the compose menu exit logic to first free the BODY data
      and then call the shared actx free function at the bottom.
  16. 06 Aug, 2017 1 commit
  17. 01 Jun, 2017 1 commit
  18. 09 May, 2017 3 commits
    • Kevin J. McCarthy's avatar
      Create R_PAGER_FLOW config variable flag. · 0636c24b
      Kevin J. McCarthy authored
      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.
    • Kevin J. McCarthy's avatar
      Rename REDRAW_SIGWINCH to REDRAW_FLOW. · 71b52d48
      Kevin J. McCarthy authored
      The next patch will attach this redraw flag to pager settings.  The
      former name becomes somewhat confusing with the expanded usage, so
      rename it to something more relevant to what is being redrawn.
    • Kevin J. McCarthy's avatar
      Add $header_color_partial to allow partial coloring of headers. · 89c6fd8d
      Kevin J. McCarthy authored
      When set, a regexp match will color only the matched text in the
      header.  When unset (the default), the entire header will have color
      With appropriate regexps, this allows coloring of just the header
      field name.  Of course, it can also be used to highlight arbitrary
      phrases in the headers too.
  19. 05 May, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Change message modifying operations to additively set redraw flags. · dff811a2
      Kevin J. McCarthy authored
      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.
  20. 18 Apr, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Handle the pager sort prompt inside the pager. · ce5bfd53
      Kevin J. McCarthy authored
      Display the prompt in the pager, so a multiline prompt or resize
      doesn't refresh the index menu.  Then, bounce back through the index
      to handle resorting and status line updates.
      This also fixes cancelling to stay in the pager.
  21. 15 Apr, 2017 1 commit
  22. 05 Apr, 2017 2 commits
  23. 01 Apr, 2017 4 commits
  24. 27 Mar, 2017 3 commits
  25. 29 Jan, 2017 2 commits
  26. 23 Oct, 2016 1 commit
  27. 23 Sep, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Clear pager position when toggling headers. · cf76d30a
      Kevin J. McCarthy authored
      It doesn't make sense to try to preserve the pager position when
      toggling headers: the purpose of toggling headers is to see the
      headers in full or weeded state.  So, reset the position back to the