Re: [patch] read-thread
This looks good to me.
-Daniel
On Wed, Sep 03, 2003 at 07:45:29PM +0300, Anatoly Vorobey <mellon@xxxxxxxxx>
wrote:
> Since I received no responses at all when
> I reported a long-standing bug in mutt a few weeks
> ago and provided a patch, nor did I have any better luck
> trying to contact the maintainer personally, I'll just dump
> my patch onto the list again. Hopefully this time someone
> will give a damn.
>
> ---------
> The commands "read-thread" (^R) and "read-subthread" (Esc-R)
> do not honor the resolve variable (they don't advance cursor after
> marking the thread/subthread as read), which, to me at least, is a
> nuisance. I tracked this to a bug in curs_main.c, and below if a fix,
> tested and working. Checking the CVS reveals that this code
> hasn't been changed for at least 4 years (since revision 1.1 of this
> file), so for all I know, I may be missing something here, but it seems
> very unlikely to me.
>
>
> The patch is against current CVS version, all comments are welcome.
>
>
> Index: curs_main.c
> ===================================================================
> RCS file: /home/roessler/cvs/mutt/curs_main.c,v
> retrieving revision 3.15
> diff -u -r3.15 curs_main.c
> --- curs_main.c 15 Jul 2003 11:41:32 -0000 3.15
> +++ curs_main.c 11 Aug 2003 02:21:31 -0000
> @@ -1917,8 +1917,11 @@
> {
> if (option (OPTRESOLVE))
> {
> - if ((menu->oldcurrent = ci_next_undeleted (menu->current))
> == -1)
> - menu->oldcurrent = menu->current;
> + if ((menu->current =
> + (op == OP_MAIN_READ_THREAD ?
> + mutt_next_thread(CURHDR) : mutt_next_subthread(CURHDR)
> + )) == -1)
> + menu->current = menu->oldcurrent;
> }
> menu->redraw = REDRAW_INDEX | REDRAW_STATUS;
> }
>
--
Daniel E. Eisenbud
eisenbud@xxxxxxxxxxxxxx
Computational Biology Center
Memorial Sloan-Kettering Cancer Center