summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2016-07-22 23:01:20 -0600
committerEduardo Chappa <chappa@washington.edu>2016-07-22 23:01:20 -0600
commit9ba831b137ec7dc2cd09823647db1e63013a949d (patch)
tree2f2877aac8e7592f6851fe9d2608b65c36b6d55c
parentb8483b5f6859a343516c8782f6f8d3dbcb4db168 (diff)
downloadalpine-9ba831b137ec7dc2cd09823647db1e63013a949d.tar.xz
* Bug: When selecting messages while in Threaded Index Screen, some
messages other than top of threads could appear in the index, making Alpine display messages "out of the screen." The solution was to apply unview_thread to all threads.
-rw-r--r--alpine/mailindx.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/alpine/mailindx.c b/alpine/mailindx.c
index 90ea22a6..4c98e74b 100644
--- a/alpine/mailindx.c
+++ b/alpine/mailindx.c
@@ -798,6 +798,21 @@ view_a_thread:
case MC_THRDINDX :
+ if(any_lflagged(msgmap, MN_SLCT)){
+ PINETHRD_S *thrd, *topthrd;
+ for(i = 1L; i > 0L && i <= mn_get_total(msgmap);){
+ thrd = fetch_thread(stream, i);
+ if(thrd && thrd->top)
+ topthrd = fetch_thread(stream, thrd->top);
+ if(topthrd){
+ set_thread_lflags(stream, topthrd, msgmap, MN_CHID, 1);
+ set_thread_lflags(stream, topthrd, msgmap, MN_CHID2, 0);
+ set_lflag(stream, msgmap, mn_raw2m(msgmap, topthrd->rawno), MN_CHID, 0);
+ set_lflag(stream, msgmap, mn_raw2m(msgmap, topthrd->rawno), MN_COLL, 1);
+ }
+ i = thrd->nextthd;
+ }
+ }
msgmap->top = msgmap->top_after_thrd;
if(unview_thread(state, stream, msgmap)){
state->next_screen = mail_index_screen;