- CHECK_MSGCOUNT;
- if (Context->magic == M_NNTP)
- {
- HEADER *h;
- int old = CURHDR->index, i;
-
- if (!CURHDR->env->message_id)
- {
- mutt_error _("No Message-Id. Unable to perform operation");
- break;
- }
-
- if (!Context->id_hash)
- Context->id_hash = mutt_make_id_hash (Context);
- strfcpy (buf, CURHDR->env->message_id, sizeof (buf));
-
- if (op == OP_RECONSTRUCT_THREAD)
- {
- LIST *ref = CURHDR->env->references;
- while (ref)
- {
- nntp_check_msgid (Context, ref->data);
- /* the last msgid in References is the root message */
- if (!ref->next)
- strfcpy (buf, ref->data, sizeof (buf));
- ref = ref->next;
- }
- }
- mutt_message _("Check for children of message...");
- if (nntp_check_children (Context, buf) == 0)
- {
- mutt_sort_headers (Context, (op == OP_RECONSTRUCT_THREAD));
- h = hash_find (Context->id_hash, buf);
- /* if the root message was retrieved, move to it */
- if (h)
- menu->current = h->virtual;
- else /* try to restore old position */
- for (i = 0; i < Context->msgcount; i++)
- if (Context->hdrs[i]->index == old)
- {
- menu->current = Context->hdrs[i]->virtual;
- /* As an added courtesy, recenter the menu
- * with the current entry at the middle of the screen */
- menu_check_recenter (menu);
- menu_current_middle (menu);
- }
- }
- menu->redraw = REDRAW_FULL;
- mutt_clear_error ();
- }
- break;
+ CHECK_MSGCOUNT;
+ if (Context->magic == M_NNTP)
+ {
+ HEADER *h;
+ int old = CURHDR->index, i;
+
+ if (!CURHDR->env->message_id)
+ {
+ mutt_error _("No Message-Id. Unable to perform operation");
+ break;
+ }
+
+ if (!Context->id_hash)
+ Context->id_hash = mutt_make_id_hash (Context);
+ strfcpy (buf, CURHDR->env->message_id, sizeof (buf));
+
+ if (op == OP_RECONSTRUCT_THREAD)
+ {
+ LIST *ref = CURHDR->env->references;
+ while (ref)
+ {
+ nntp_check_msgid (Context, ref->data);
+ /* the last msgid in References is the root message */
+ if (!ref->next)
+ strfcpy (buf, ref->data, sizeof (buf));
+ ref = ref->next;
+ }
+ }
+ mutt_message _("Check for children of message...");
+ if (nntp_check_children (Context, buf) == 0)
+ {
+ mutt_sort_headers (Context, (op == OP_RECONSTRUCT_THREAD));
+ h = hash_find (Context->id_hash, buf);
+ /* if the root message was retrieved, move to it */
+ if (h)
+ menu->current = h->virtual;
+ else /* try to restore old position */
+ for (i = 0; i < Context->msgcount; i++)
+ if (Context->hdrs[i]->index == old)
+ {
+ menu->current = Context->hdrs[i]->virtual;
+ /* As an added courtesy, recenter the menu
+ * with the current entry at the middle of the screen */
+ menu_check_recenter (menu);
+ menu_current_middle (menu);
+ }
+ }
+ menu->redraw = REDRAW_FULL;
+ mutt_clear_error ();
+ }
+ break;