Merge pull request #276706 from Ma27/bump-neomutt

neomutt: 20231103 -> 20231221
This commit is contained in:
Ryan Lahfa 2024-01-12 20:03:38 +01:00 committed by GitHub
commit fb1f1bcdd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 65 deletions

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, gettext, makeWrapper, tcl, which
{ lib, stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which
, ncurses, perl , cyrus_sasl, gss, gpgme, libkrb5, libidn2, libxml2, notmuch, openssl
, lua, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, w3m, mailcap, sqlite, zlib, lndir
, pkg-config, zstd, enableZstd ? true, enableMixmaster ? false, enableLua ? false
@ -6,27 +6,16 @@
}:
stdenv.mkDerivation rec {
version = "20231103";
version = "20231221";
pname = "neomutt";
src = fetchFromGitHub {
owner = "neomutt";
repo = "neomutt";
rev = version;
sha256 = "sha256-9/XYgQjOdIwDpoJz5kNmiRBdoSod9l7Yl0u4e20KDPw=";
sha256 = "sha256-IXly2N/DD2+XBXVIXJw1sE/0eJwbUaONDNRMi7n1T44=";
};
patches = [
# https://github.com/neomutt/neomutt/issues/3773#issuecomment-1493295144
./fix-open-very-large-mailbox.patch
# https://github.com/neomutt/neomutt/issues/4128
(fetchpatch {
name = "fix-attr-color-copy.patch";
url = "https://github.com/neomutt/neomutt/commit/24f8644c28e602206a63fae53c4eb3d32426ce0c.patch";
hash = "sha256-8qcW9hb6yxEZICRYgl6ZhPQDrI6nZN9NH+40GhTgR0o=";
})
];
buildInputs = [
cyrus_sasl gss gpgme libkrb5 libidn2 ncurses
notmuch openssl perl lmdb

View File

@ -1,51 +0,0 @@
diff --git a/mutt_mailbox.c b/mutt_mailbox.c
index 5581a8187..22f0ca21a 100644
--- a/mutt_mailbox.c
+++ b/mutt_mailbox.c
@@ -160,6 +160,9 @@ int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
st_ctx.st_dev = 0;
st_ctx.st_ino = 0;
+ if (kInMboxOpen)
+ return 0;
+
#ifdef USE_IMAP
if (flags & MUTT_MAILBOX_CHECK_FORCE)
mutt_update_num_postponed();
diff --git a/mx.c b/mx.c
index 4bf5af141..a4e9f83f5 100644
--- a/mx.c
+++ b/mx.c
@@ -295,6 +295,8 @@ bool mx_mbox_ac_link(struct Mailbox *m)
return true;
}
+int kInMboxOpen = 0;
+
/**
* mx_mbox_open - Open a mailbox and parse it
* @param m Mailbox to open
@@ -386,8 +388,10 @@ bool mx_mbox_open(struct Mailbox *m, OpenMailboxFlags flags)
m->msg_tagged = 0;
m->vcount = 0;
+ kInMboxOpen = 1;
enum MxOpenReturns rc = m->mx_ops->mbox_open(m);
m->opened++;
+ kInMboxOpen = 0;
if ((rc == MX_OPEN_OK) || (rc == MX_OPEN_ABORT))
{
diff --git a/mx.h b/mx.h
index 741431570..43e40bf32 100644
--- a/mx.h
+++ b/mx.h
@@ -38,6 +38,8 @@ extern const struct MxOps *mx_ops[];
extern struct EnumDef MboxTypeDef;
+extern int kInMboxOpen;
+
typedef uint8_t MsgOpenFlags; ///< Flags for mx_msg_open_new(), e.g. #MUTT_ADD_FROM
#define MUTT_MSG_NO_FLAGS 0 ///< No flags are set
#define MUTT_ADD_FROM (1 << 0) ///< add a From_ line