Hello community,

here is the log from the commit of package neomutt for openSUSE:Factory checked 
in at 2020-09-14 12:32:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/neomutt (Old)
 and      /work/SRC/openSUSE:Factory/.neomutt.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "neomutt"

Mon Sep 14 12:32:15 2020 rev:14 rq:834007 version:20200821

Changes:
--------
--- /work/SRC/openSUSE:Factory/neomutt/neomutt.changes  2020-07-08 
19:18:05.828057175 +0200
+++ /work/SRC/openSUSE:Factory/.neomutt.new.4249/neomutt.changes        
2020-09-14 12:33:49.849309186 +0200
@@ -1,0 +2,104 @@
+Sun Aug 23 01:35:21 UTC 2020 - Kai Liu <[email protected]>
+
+- Update to 20200821:
+  * Bug Fixes
+    - fix maildir flag generation
+    - fix query notmuch if file is missing
+    - notmuch: don't abort sync on error
+    - fix type checking for send config variables
+  * Changed Config
+    - $sidebar_format - Use %D rather than %B for named mailboxes
+  * Translations
+    - 96% Lithuanian
+    - 90% Polish
+- add neomutt-sidebar-abbreviate-shorten-what-user-sees.patch
+  * fix(sidebar): abbreviate/shorten what user sees
+
+-------------------------------------------------------------------
+Tue Aug 18 08:23:36 UTC 2020 - Kai Liu <[email protected]>
+
+- Fix sidebar mailbox name display problem. Patch from the yet to
+  be merge upstream commit:
+  
https://github.com/neomutt/neomutt/commit/a6f91bc9c890581cff189e143d86e656cab6d2dc
+
+-------------------------------------------------------------------
+Mon Aug 17 02:04:11 UTC 2020 - Kai Liu <[email protected]>
+
+- Enable --zlib configure option explicitely. In version 20200814 if
+  it's not enabled header cache compression will not be turned on,
+  unlike in previous versions which would turn it on when zlib is
+  detected.
+
+-------------------------------------------------------------------
+Sat Aug 15 01:06:30 UTC 2020 - Kai Liu <[email protected]>
+
+- Update to 20200814:
+  * Notes
+    - Add one-liner docs to config items
+      See: neomutt -O -Q smart_wrap
+    - Remove the built-in editor
+      A large unused and unusable feature
+  * Security
+    - Add mitigation against DoS from thousands of parts
+  * Features
+    - Allow index-style searching in postpone menu
+    - Open NeoMutt using a mailbox name
+    - Add cd command to change the current working directory
+    - Add tab-completion menu for patterns
+    - Allow renaming existing mailboxes
+    - Check for missing attachments in alternative parts
+    - Add one-liner docs to config items
+  * Bug Fixes
+    - Fix logic in checking an empty From address
+    - Fix Imap crash in cmd_parse_expunge()
+    - Fix setting attributes with S-Lang
+    - Fix: redrawing of $pager_index_lines
+    - Fix progress percentage for syncing large mboxes
+    - Fix sidebar drawing in presence of indentation + named mailboxes
+    - Fix retrieval of drafts when "postponed" is not in the mailboxes list
+    - Do not add comments to address group terminators
+    - Fix alias sorting for degenerate addresses
+    - Fix attaching emails
+    - Create directories for nonexistent file hcache case
+    - Avoid creating mailboxes for failed subscribes
+    - Fix crash if rejecting cert
+  * Changed Config
+    - Add $copy_decode_weed, $pipe_decode_weed, $print_decode_weed
+    - Change default of $crypt_protected_headers_subject to "..."
+    - Add default keybindings to history-up/down
+  * Translations
+    - 100% Czech
+    - 100% Spanish
+  * Build
+    - Allow building against Lua 5.4
+    - Fix when sqlite3.h is missing
+  * Docs
+    - Add a brief section on stty to the manual
+    - Update section "Terminal Keybindings" in the manual
+    - Clarify PGP Pseudo-header S<id> duration
+  * Code
+    - Clean up String API
+    - Make the Sidebar more independent
+    - De-centralise the Config Variables
+    - Refactor dialogs
+    - Refactor: Help Bar generation
+    - Make more APIs Context-free
+    - Adjust the edata use in Maildir and Notmuch
+    - Window refactoring
+    - Convert libsend to use Config functions
+    - Refactor notifications to reduce noise
+    - Convert Keymaps to use STAILQ
+    - Track currently selected email by msgid
+    - Config: no backing global variable
+    - Add events for key binding
+  * Upstream
+    - Fix imap postponed mailbox use-after-free error
+    - Speed up thread sort when many long threads exist
+    - Fix ~v tagging when switching to non-threaded sorting
+    - Add message/global to the list of known "message" types
+    - Print progress meter when copying/saving tagged messages
+    - Remove ansi formatting from autoview generated quoted replies
+    - Change postpone mode to write Date header too
+    - Unstuff format=flowed
+
+-------------------------------------------------------------------

Old:
----
  20200626.tar.gz

New:
----
  20200821.tar.gz
  neomutt-sidebar-abbreviate-shorten-what-user-sees.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ neomutt.spec ++++++
--- /var/tmp/diff_new_pack.aaC4ng/_old  2020-09-14 12:33:51.217310058 +0200
+++ /var/tmp/diff_new_pack.aaC4ng/_new  2020-09-14 12:33:51.221310061 +0200
@@ -17,13 +17,14 @@
 
 
 Name:           neomutt
-Version:        20200626
+Version:        20200821
 Release:        0
 Summary:        A command line mail reader (or MUA), a fork of Mutt with added 
features
 License:        GPL-2.0-or-later
 Group:          Productivity/Networking/Email/Clients
 URL:            https://neomutt.org
 Source:         https://github.com/neomutt/neomutt/archive/%{version}.tar.gz
+Patch0:         neomutt-sidebar-abbreviate-shorten-what-user-sees.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  cyrus-sasl-devel
@@ -69,6 +70,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 export CFLAGS="%{optflags}"
@@ -84,7 +86,8 @@
                --sasl                          \
                --gss                           \
                --idn                           \
-               --mixmaster
+               --mixmaster                     \
+               --zlib
 
 make %{?_smp_mflags}
 

++++++ 20200626.tar.gz -> 20200821.tar.gz ++++++
++++ 318210 lines of diff (skipped)

++++++ neomutt-sidebar-abbreviate-shorten-what-user-sees.patch ++++++
>From a6f91bc9c890581cff189e143d86e656cab6d2dc Mon Sep 17 00:00:00 2001
From: Austin Ray <[email protected]>
Date: Wed, 8 Jul 2020 17:17:59 -0400
Subject: [PATCH] fix(sidebar): abbreviate/shorten what user sees

If a user opted to display a name, perform the sidebar shorten,
abbreviation, and indentation on the name, not the path. Otherwise,
sidebar may render names incorrectly due to operation being calculated
on the path. Notmuch users are more susceptible since queries often
contain file paths or other characters such periods.

If a user wants to display a name but operate under a folder hierarchy,
they must represent that hierarchy in the name.
---
 sidebar/private.h |  4 ++-
 sidebar/sidebar.c | 69 +++++++++++++++++++++++++++--------------------
 2 files changed, 43 insertions(+), 30 deletions(-)

diff --git a/sidebar/private.h b/sidebar/private.h
index 94ba88498b..fadcada9ee 100644
--- a/sidebar/private.h
+++ b/sidebar/private.h
@@ -36,7 +36,9 @@ extern struct ListHead SidebarWhitelist;
 struct SbEntry
 {
   char box[256];           ///< Mailbox path (possibly abbreviated)
-  int depth;               ///< Indentation depth
+  char name[256];          ///< Mailbox name (possibly abbreviated)
+  int depth;               ///< Indentation depth for path
+  int name_depth;          ///< Indentation for name
   struct Mailbox *mailbox; ///< Mailbox this represents
   bool is_hidden;          ///< Don't show, e.g. $sidebar_new_mail_only
   enum ColorId color;      ///< Colour to use
diff --git a/sidebar/sidebar.c b/sidebar/sidebar.c
index b729af0740..8cb8587d13 100644
--- a/sidebar/sidebar.c
+++ b/sidebar/sidebar.c
@@ -57,10 +57,10 @@ struct ListHead SidebarWhitelist = 
STAILQ_HEAD_INITIALIZER(SidebarWhitelist); //
  * @param sbe    Sidebar entry
  * @retval Number of bytes written
  */
-static size_t add_indent(char *buf, size_t buflen, const struct SbEntry *sbe)
+static size_t add_indent(char *buf, size_t buflen, const int depth)
 {
   size_t res = 0;
-  for (int i = 0; i < sbe->depth; i++)
+  for (int i = 0; i < depth; i++)
   {
     res += mutt_str_copy(buf + res, C_SidebarIndentString, buflen - res);
   }
@@ -114,9 +114,10 @@ static const char *sidebar_format_str(char *buf, size_t 
buflen, size_t col, int
     case 'D':
     {
       char indented[256];
-      size_t offset = add_indent(indented, sizeof(indented), sbe);
+      int depth = (op == 'D' && sbe->mailbox->name) ? sbe->name_depth : 
sbe->depth;
+      size_t offset = add_indent(indented, sizeof(indented), depth);
       snprintf(indented + offset, sizeof(indented) - offset, "%s",
-               ((op == 'D') && sbe->mailbox->name) ? sbe->mailbox->name : 
sbe->box);
+               ((op == 'D') && sbe->mailbox->name) ? sbe->name : sbe->box);
 
       mutt_format_s(buf, buflen, prec, indented);
       break;
@@ -795,6 +796,37 @@ static int calc_path_depth(const char *mbox, const char 
*delims, const char **la
   return depth;
 }
 
+static const char *shorten_abbreviate(struct Mailbox *m, const char 
*name_or_path, int *depth)
+{
+  // Try to abbreviate the full path
+  const char *abbr = abbrev_folder(name_or_path, C_Folder, m->type);
+  if (!abbr)
+    abbr = abbrev_url(name_or_path, m->type);
+  const char *shortened = abbr ? abbr : name_or_path;
+
+  /* Compute the depth */
+  const char *last_part = abbr;
+  *depth = calc_path_depth(abbr, C_SidebarDelimChars, &last_part);
+  if (!C_SidebarFolderIndent)
+    *depth = 0;
+
+  const bool short_is_abbr = (shortened == abbr);
+  if (C_SidebarShortPath)
+  {
+    shortened = last_part;
+  }
+
+  // Don't indent if we were unable to create an abbreviation.
+  // Otherwise, the full path will be indent, and it looks unusual.
+  if (C_SidebarFolderIndent && short_is_abbr)
+  {
+    if (C_SidebarComponentDepth > 0)
+      *depth -= C_SidebarComponentDepth;
+  }
+
+  return shortened;
+}
+
 /**
  * draw_sidebar - Write out a list of mailboxes, in a panel
  * @param wdata     Sidebar data
@@ -877,34 +909,13 @@ static void draw_sidebar(struct SidebarWindowData *wdata, 
struct MuttWindow *win
     }
 
     const char *path = mailbox_path(m);
+    const char *name = m->name;
 
-    // Try to abbreviate the full path
-    const char *abbr = abbrev_folder(path, C_Folder, m->type);
-    if (!abbr)
-      abbr = abbrev_url(path, m->type);
-    const char *short_path = abbr ? abbr : path;
-
-    /* Compute the depth */
-    const char *last_part = abbr;
-    entry->depth = calc_path_depth(abbr, C_SidebarDelimChars, &last_part);
-
-    const bool short_path_is_abbr = (short_path == abbr);
-    if (C_SidebarShortPath)
-    {
-      short_path = last_part;
-    }
-
-    // Don't indent if we were unable to create an abbreviation.
-    // Otherwise, the full path will be indent, and it looks unusual.
-    if (C_SidebarFolderIndent && short_path_is_abbr)
-    {
-      if (C_SidebarComponentDepth > 0)
-        entry->depth -= C_SidebarComponentDepth;
-    }
-    else if (!C_SidebarFolderIndent)
-      entry->depth = 0;
+    const char *short_path = shorten_abbreviate(m, path, &entry->depth);
+    const char *short_name = shorten_abbreviate(m, name, &entry->name_depth);
 
     mutt_str_copy(entry->box, short_path, sizeof(entry->box));
+    mutt_str_copy(entry->name, short_name, sizeof(entry->name));
     char str[256];
     make_sidebar_entry(str, sizeof(str), w, entry);
     mutt_window_printf("%s", str);

Reply via email to