Skip to content

Instantly share code, notes, and snippets.

@joelrebel
Created October 17, 2014 08:00
Show Gist options
  • Save joelrebel/b20b730b844443cb6770 to your computer and use it in GitHub Desktop.
Save joelrebel/b20b730b844443cb6770 to your computer and use it in GitHub Desktop.
--- a/functions.h 2014-10-17 13:54:38.436185512 +0800
+++ b/functions.h 2014-10-17 13:57:38.742969851 +0800
@@ -150,6 +150,7 @@
{ "clear-flag", OP_MAIN_CLEAR_FLAG, "W" },
{ "display-message", OP_DISPLAY_MESSAGE, M_ENTER_S },
{ "buffy-list", OP_BUFFY_LIST, "." },
+ { "buffy-refresh", OP_BUFFY_REFRESH, "`"},
{ "sync-mailbox", OP_MAIN_SYNC_FOLDER, "$" },
{ "display-address", OP_DISPLAY_ADDRESS, "@" },
{ "pipe-message", OP_PIPE, "|" },
@@ -255,6 +256,7 @@
{ "shell-escape", OP_SHELL_ESCAPE, "!" },
{ "enter-command", OP_ENTER_COMMAND, ":" },
{ "buffy-list", OP_BUFFY_LIST, "." },
+ { "buffy-refresh", OP_BUFFY_REFRESH, "`" },
{ "search", OP_SEARCH, "/" },
{ "search-reverse", OP_SEARCH_REVERSE, "\033/" },
{ "search-opposite", OP_SEARCH_OPPOSITE, NULL },
@@ -392,6 +394,7 @@
{ "toggle-mailboxes", OP_TOGGLE_MAILBOXES, "\t" },
{ "view-file", OP_BROWSER_VIEW_FILE, " " },
{ "buffy-list", OP_BUFFY_LIST, "." },
+ { "buffy-refresh", OP_BUFFY_REFRESH, "`" },
#ifdef USE_IMAP
{ "create-mailbox", OP_CREATE_MAILBOX, "C" },
{ "delete-mailbox", OP_DELETE_MAILBOX, "d" },
--- a/curs_main.c 2014-10-17 14:05:58.002657394 +0800
+++ b/curs_main.c 2014-10-17 14:00:34.205809522 +0800
@@ -2241,6 +2241,10 @@
mutt_buffy_list ();
break;
+ case OP_BUFFY_REFRESH:
+ mutt_buffy_check (1);
+ break;
+
case OP_VIEW_ATTACHMENTS:
CHECK_MSGCOUNT;
CHECK_VISIBLE;
--- a/OPS 2014-10-17 14:07:15.832389221 +0800
+++ b/OPS 2014-10-17 13:59:15.160920510 +0800
@@ -12,6 +12,7 @@
OP_BROWSER_UNSUBSCRIBE "unsubscribe from current mailbox (IMAP only)"
OP_BROWSER_TOGGLE_LSUB "toggle view all/subscribed mailboxes (IMAP only)"
OP_BUFFY_LIST "list mailboxes with new mail"
+OP_BUFFY_REFRESH "Refresh sidebar mail count"
OP_CHANGE_DIRECTORY "change directories"
OP_CHECK_NEW "check mailboxes for new mail"
OP_COMPOSE_ATTACH_FILE "attach file(s) to this message"
--- a/pager.c 2014-10-17 14:12:33.825245650 +0800
+++ b/pager.c 2014-10-17 14:13:52.930287665 +0800
@@ -2730,6 +2730,10 @@
case OP_BUFFY_LIST:
mutt_buffy_list ();
break;
+
+ case OP_BUFFY_REFRESH:
+ mutt_buffy_check (1);
+ break;
case OP_VIEW_ATTACHMENTS:
if (flags & M_PAGER_ATTACHMENT)
--- a/browser.c 2014-10-17 14:12:44.289246049 +0800
+++ b/browser.c 2014-10-17 14:13:27.770286690 +0800
@@ -1219,6 +1219,10 @@
case OP_BUFFY_LIST:
mutt_buffy_list ();
break;
+
+ case OP_BUFFY_REFRESH:
+ mutt_buffy_check (1);
+ break;
case OP_BROWSER_NEW_FILE:
--- a/curs_main.c 2014-10-17 14:32:28.480588937 +0800
+++ b/curs_main.c 2014-10-17 14:33:44.473534057 +0800
@@ -530,8 +530,8 @@
{
/* check for new mail in the incoming folders */
oldcount = newcount;
- if ((newcount = mutt_buffy_check (0)) != oldcount)
- menu->redraw |= REDRAW_STATUS;
+ //if ((newcount = mutt_buffy_check (0)) != oldcount)
+ // menu->redraw |= REDRAW_STATUS;
if (do_buffy_notify)
{
if (mutt_buffy_notify ())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment