Re: multiple accounts - my problem and a solution
On Wed, Jan 14, 2004 at 07:38:23PM +0000, Varol Kaptan wrote:
> Hi everyone,
>
> [stuff deleted]
>
> I would also appreciate if the person who is responsible/maintaining
> the respective code in browser.c has a look at my patch and decide
> whether there is a better method of solving this issue.
>
> Cheers,
> Varol Kaptan
... and here is the missing patch
diff -ur mutt-1.4.1/browser.c mutt-1.4.1vk/browser.c
--- mutt-1.4.1/browser.c 2002-07-24 10:33:59.000000000 +0100
+++ mutt-1.4.1vk/browser.c 2004-01-14 18:46:20.000000000 +0000
@@ -527,6 +527,11 @@
return ff->tagged - ot;
}
+void _mutt_forget_lastdir(void)
+{
+ LastDirBackup[0] = LastDir[0] = '\0';
+}
+
void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int
*numfiles)
{
char buf[_POSIX_PATH_MAX];
diff -ur mutt-1.4.1/init.c mutt-1.4.1vk/init.c
--- mutt-1.4.1/init.c 2002-07-24 09:41:29.000000000 +0100
+++ mutt-1.4.1vk/init.c 2004-01-05 23:43:59.000000000 +0000
@@ -929,6 +929,7 @@
strfcpy (scratch, tmp->data, sizeof (scratch));
mutt_expand_path (scratch, sizeof (scratch));
*((char **) MuttVars[idx].data) = safe_strdup (scratch);
+ _mutt_forget_lastdir();
}
else if (DTYPE (MuttVars[idx].type) == DT_STR)
{
diff -ur mutt-1.4.1/protos.h mutt-1.4.1vk/protos.h
--- mutt-1.4.1/protos.h 2002-04-29 18:12:18.000000000 +0100
+++ mutt-1.4.1vk/protos.h 2004-01-05 23:42:37.000000000 +0000
@@ -212,6 +212,7 @@
void mutt_select_fcc (char *, size_t, HEADER *);
#define mutt_select_file(A,B,C) _mutt_select_file(A,B,C,NULL,NULL)
void _mutt_select_file (char *, size_t, int, char ***, int *);
+void _mutt_forget_lastdir(void);
void mutt_message_hook (CONTEXT *, HEADER *, int);
void _mutt_set_flag (CONTEXT *, HEADER *, int, int, int);
#define mutt_set_flag(a,b,c,d) _mutt_set_flag(a,b,c,d,1)