Your message dated Sun, 13 Sep 2009 20:18:14 +0100
with message-id <20090913191814.ga19...@debian>
and subject line Re: Bug#471894: mutt-patched: sidebar cursor jumps to top when
selecting the root folder of an imap[s] server
has caused the Debian Bug report #471894,
regarding mutt-patched: sidebar cursor jumps to top when selecting the root
folder of an imap[s] server
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
471894: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471894
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mutt-patched
Version: 1.5.17+20080114-1
Severity: normal
Tags: patch
I have folders from several IMAP servers in my config. Some of them are
the root (really INBOX) folders, e.g.
imap://host/
When I try to select one of those, the sidebar cursor jumps to the top,
rather than remaining on that folder.
I tracked this down to a basename() call. Apparently, basename
sometimes modifies its input...specifically when it ends in a '/'. I've
attached a patch that makes a copy of the string to send to basename, to
avoid trashing the path members of buffy objects. I'm wary of
refreshing the sidebar patch, so I just have quilt apply this patch
directly after the sidebar patch.
Thanks,
John
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-1-686 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages mutt-patched depends on:
ii libc6 2.7-8 GNU C Library: Shared libraries
ii libgdbm3 1.8.3-3 GNU dbm database routines (runtime
ii libgnutls26 2.2.2-1 the GNU TLS library - runtime libr
ii libidn11 1.4-1 GNU libidn library, implementation
ii libncursesw5 5.6+20080203-1 Shared libraries for terminal hand
ii libsasl2-2 2.1.22.dfsg1-19 Cyrus SASL - authentication abstra
ii mutt 1.5.17+20080114-1 text-based mailreader supporting M
ii mutt-ng [mutt] 0.0+20060429-3 text-based mailreader supporting M
mutt-patched recommends no packages.
-- no debconf information
# vim:ft=diff:
The draw_sidebar function uses the basename function to decide what to display
on the sidebar for each mailbox folder. Unfortunately, basename will sometimes
modify the string pointed to by its argument! This results in the set_curbuffy
function being unable to find your current mailbox (and therefore setting the
cursor to the very top mailbox) if the path to it ends in a '/', e.g.
imaps://host/
This patch makes a copy of the path member to send to basename, so that the
path doesn't get trashed.
Index: unstable/sidebar.c
===================================================================
--- unstable.orig/sidebar.c 2008-03-20 15:28:04.000000000 -0600
+++ unstable/sidebar.c 2008-03-20 15:34:39.000000000 -0600
@@ -139,6 +139,8 @@
static int prev_show_value;
static short saveSidebarWidth;
+ char *tmp_path;
+
/* initialize first time */
if(!initialized) {
prev_show_value = option(OPTSIDEBAR);
@@ -229,8 +231,9 @@
tmp->msg_unread = Context->unread;
tmp->msgcount = Context->msgcount;
}
+ tmp_path = safe_strdup(tmp->path);
printw( "%.*s", SidebarWidth - delim_len + 1,
- make_sidebar_entry(basename(tmp->path), tmp->msgcount,
+ make_sidebar_entry(basename(tmp_path), tmp->msgcount,
tmp->msg_unread));
lines++;
}
--- End Message ---
--- Begin Message ---
fixed 471894 1.5.20-2
thanks
Hi,
I've checked the current version we have of sidebar.c and this seems fixed. I'm
resolving this bug then, please reopen if it's still an issue.
Cheers
Antonio
--- End Message ---