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
      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.
      248c2ee8
  2. 31 Dec, 2018 1 commit
  3. 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.
      32734a9f
  4. 26 Jul, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Add message padding to ctx->vsize computation. · 5f5dc70f
      Kevin J. McCarthy authored
      Use the mx_msg_padding_size() from the previous commit to be more
      precise about the correct vsize.
      
      This avoids strange situations where all the message are displayed in
      a limit, but the vsize is not equal to the size.
      5f5dc70f
  5. 25 Jul, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Handle reopen/new_mail when closing mailbox in <imap-logout-all>. · 1147aed6
      Kevin J. McCarthy authored
      Other callers, such as OP_QUIT, OP_MAIN_CHANGE_FOLDER, and
      OP_MAIN_SYNC_FOLDER handle the case where a sync or close_mailbox
      fails due to new mail or a reopen.
      
      OP_MAIN_LOGOUT_ALL appears to have been accidentally missed.  Add a
      call to update_index() to properly sort and update vcounts.
      1147aed6
  6. 21 Jul, 2018 2 commits
    • Vincent Lefevre's avatar
      Bug fix: reset ctx->vsize in update_index_unthreaded on reopened mailbox. · 9a314f02
      Vincent Lefevre authored
      This fixes a bug observed when doing the following:
      1. Start Mutt on some mailbox.
      2. Limit the view.
      3. Set sort by date (thus unthreaded).
      4. Set $status_format to display the size of the messages shown (%L).
      5. Copy a message matching the limit pattern to this mailbox.
      6. With another Mutt instance, remove this message from this mailbox.
      7. Move the cursor to update the view.
      Result: one was getting a value equal to twice the initial size.
      9a314f02
    • Vincent Lefevre's avatar
      Cleanup: avoid an ugly local preprocessor macro. · b9eddeab
      Vincent Lefevre authored
      Note: This macro was also hiding the use of a variable, making the code
      difficult to read.
      b9eddeab
  7. 20 Jul, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Display matching new messages in a thread-limited index. · 1d41321a
      Kevin J. McCarthy authored
      Previously, the index performed pattern matching first, and then
      resorted new mail.  The problem was that thread-limiting patterns,
      e.g. ~(pattern), require threading data to properly match against the
      new messages.
      
      We already save new messages for the purposes of uncollapsing threads.
      To keep the code cleaner, split off update_index() into
      update_index_threaded()/unthreaded().  Then for threaded mode, save
      the new messages first.  We can then sort (before pattern matching),
      and use the save_new array to pattern match the new messages
      afterwards.
      
      The $uncollapse_new loop was unnecessarily performing a n^2 search.
      Simplify to just iteratate over the save_new instead.
      1d41321a
  8. 29 Jun, 2018 1 commit
  9. 03 Jun, 2018 1 commit
  10. 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
      future.
      26b82202
  11. 08 Jan, 2018 1 commit
  12. 11 Nov, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Add $change_folder_next option to control mailbox suggestion order. · 610c6b0a
      Kevin J. McCarthy authored
      This patch is out of the Gentoo package maintained by Fabian Groffen.
      From the link below, it appears the original author was Simon Burge.
      
      I made some minor changes to get it to apply correctly, and cleaned up
      the documentation a bit.
      
      Original patch description:
      This patch brings back the original behaviour of change-folder, which
      some people find more useful.  It suggests the next folder in your
      mailboxes list that has new mail measured from the current folder,
      instead of the first folder from your mailboxes list in any case.  This
      prevents starvation of folders defined at the back of your list ;)
      See discussion: http://thread.gmane.org/gmane.mail.mutt.devel/12457
      610c6b0a
  13. 01 Jun, 2017 2 commits
    • Kevin J. McCarthy's avatar
      Fix tag-prefix to not abort on $timeout. · 35ae06c1
      Kevin J. McCarthy authored
      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.
      35ae06c1
    • Kevin J. McCarthy's avatar
      Change km_dokey() to return -2 on a timeout/sigwinch. · 054164bf
      Kevin J. McCarthy authored
      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.
      054164bf
  14. 05 May, 2017 2 commits
  15. 05 Apr, 2017 1 commit
  16. 01 Apr, 2017 4 commits
  17. 27 Mar, 2017 4 commits
  18. 29 Jan, 2017 4 commits
    • Kevin J. McCarthy's avatar
      Improve the label completion hash table usage. · 9ae62494
      Kevin J. McCarthy authored
      Move the hash table inside the Context.  Hook message arrival/deletion
      to update the label hash.
      
      Change the label hash to strdup keys.
      
      Use hash_find_elem when updating the counter, to reduce unnecessary
      add/delete operations.
      9ae62494
    • David Champion's avatar
      Adds label completion. · f58e89c8
      David Champion authored
      A global label hash is added, to which labels are added as they're parsed
      from a mailbox file or edited manually by the user.  Reference counts are
      kept in the hash table so that unused labels are removed from available
      completions.  Completion is available in the label editor only, but it
      may be feasible to add for search expressions if the preceding text ends
      with '~y'.
      f58e89c8
    • Kevin J. McCarthy's avatar
      Minor fixes to the x-label patch from David. · f318cb48
      Kevin J. McCarthy authored
      Add L10N comment to sort menu.  Mark a couple strings for localization.
      
      Use ascii_strncasecmp() for the X-Label header comparison.
      
      Simplify label_message() using mutt library routines.
      
      Bind label editing to "Y" instead of "y".  "y" is already used in the
      default sample muttrc to display mailboxes.
      f318cb48
    • David Champion's avatar
  19. 03 Jan, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Add a pattern_cache_t to speed up a few repeated matches. · 522c26d5
      Kevin J. McCarthy authored
      Vincent Lefèvre reported experiencing an index display performance
      issue.  This occurred with messages containing many recipients.  He
      had many index color lines containing ~l.  The ~l ended up being run
      over and over on these messages, resulting in a noticable slowdown
      displaying the index.
      
      This patch adds caching for just a few of the pattern operations (~l,
      ~u, ~p, ~P) that are potentially expensive and also don't have
      arguments.  The caching is only enabled for operations repeatedly
      matching against the same message: color, hooks, scoring.
      
      The caching is fairly targeted, but isn't that invasive or
      complicated.
      522c26d5
  20. 13 Dec, 2016 1 commit
  21. 30 Nov, 2016 1 commit
  22. 18 Nov, 2016 2 commits
    • Kevin J. McCarthy's avatar
      Fix mark-message translation and keybind menu. · c1538c5d
      Kevin J. McCarthy authored
      Move the OP_MARK_MESSAGE and hotkey macro from MENU_GENERIC to the
      MENU_MAIN keymap.  Putting the macro under generic prevents it from
      overriding a keybinding in the index (even if the function is bound to
      noop).  Additionally, the macro can only be executed from the index,
      so it doesn't make sense as a generic keybinding.
      
      Use the term "hotkey" in both the OPS and km_bind description.
      
      Mark the km_bind description translatable.
      
      Add L10N messages for the new translation strings.
      c1538c5d
    • Vincent Lefevre's avatar
      Make a string translatable. · 7911e4de
      Vincent Lefevre authored
      7911e4de
  23. 17 Nov, 2016 1 commit
    • David Champion's avatar
      Adds <mark-message> binding to create "hotkeys" for messages. · fdeb4c48
      David Champion authored
      <mark-message>foo<enter> will create a new macro "'foo" which will
      return to the current message by searching for that message's
      message id.  The initial character of the macro is defined by
      $mark_macro_prefix, and defaults to "'" for verisimilitude vs. vi.
      
      Pushed by Kevin McCarthy with a minor fix.
      fdeb4c48
  24. 14 Nov, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Compress patch from the neomutt repository. · 9bf6d74e
      Kevin J. McCarthy authored
      With the following changes:
      - po/de.po changes trimmed to just the compress additions.
      
      - Move the sample muttrc to contrib, and add it to the Makefile.am so it is
        distributed.  Remove the sample vimrc.
      
      - Remove extra fluff from manual.
      
      Thanks to Roland Rosenfeld for the original patch, and to the NeoMutt
      team for their work cleaning up the patch.
      9bf6d74e
  25. 19 Oct, 2016 1 commit
  26. 08 Aug, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Clear pager position upon returning to the index menu. · 30c913c7
      Kevin J. McCarthy authored
      This fixes a bug where opening a message sometimes shows it scrolled
      down.
      
      The easiest way to trigger this is to open a long message in a mailbox
      with no new messages, scroll down, hit <next-new-then-unread> and then
      reopen the message.  The pager will "remember" the position and scroll
      down.  If you simply exit the message and re-enter it, the position is
      not saved.
      
      More annoyingly, once in a very great while I will open a new message
      and have the message scrolled down partway.  I believe this is due to
      OldHdr happening to point to the same address as the Header of the new
      message.
      
      This is somewhat easily triggered on a mailbox with one message, which
      you open, scroll down in, hit <next-new-then-unread> to exit, and then
      delete/sync.  In another mutt instance, copy the same messsage back to
      the mailbox, then open the message in the original mutt instance.  At
      least some of the time, the OldHdr pointer matches the new message,
      and so it opens scrolled down.
      
      This patch solves the problem by clearing the pager position once all
      redirections through the index menu are done.
      30c913c7
  27. 18 Jul, 2016 1 commit
    • Kevin J. McCarthy's avatar
      Add purge-message patch. · 5efa1c6d
      Kevin J. McCarthy authored
      This is based on the patch by Cedric Duval.
      Modifications are:
      
      * Use the exising M_PURGE flag from the trash folder patch, rather
        than adding a separate flag.
      
      * Undelete operations are already handled by the trash folder patch.
      5efa1c6d