This only involved changing to use the MuttMessageWindow.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
http://www.8t8.us/configs/gpg-key-transition-statement.txt
# HG changeset patch
# User Kevin McCarthy <ke...@8t8.us>
# Date 1461089995 25200
#      Tue Apr 19 11:19:55 2016 -0700
# Node ID e9a580a40064d7fddbbbafafb40ee2eba69a54aa
# Parent  79ba0bcaf0fd6a9a4fbb50b9359826147c2447a5
Modify the built-in editor to use windows.

This only involved changing to use the MuttMessageWindow.

diff --git a/edit.c b/edit.c
--- a/edit.c
+++ b/edit.c
@@ -229,33 +229,33 @@
 
 /* args:
  *     force   override the $ask* vars (used for the ~h command)
  */
 static void be_edit_header (ENVELOPE *e, int force)
 {
   char tmp[HUGE_STRING];
 
-  move (LINES-1, 0);
+  mutt_window_move (MuttMessageWindow, 0, 0);
 
   addstr ("To: ");
   tmp[0] = 0;
   mutt_addrlist_to_local (e->to);
   rfc822_write_address (tmp, sizeof (tmp), e->to, 0);
   if (!e->to || force)
   {
     if (mutt_enter_string (tmp, sizeof (tmp), 4, 0) == 0)
     {
       rfc822_free_address (&e->to);
       e->to = mutt_parse_adrlist (e->to, tmp);
       e->to = mutt_expand_aliases (e->to);
       mutt_addrlist_to_intl (e->to, NULL);     /* XXX - IDNA error reporting? 
*/
       tmp[0] = 0;
       rfc822_write_address (tmp, sizeof (tmp), e->to, 1);
-      mvaddstr (LINES - 1, 4, tmp);
+      mutt_window_mvaddstr (MuttMessageWindow, 0, 4, tmp);
     }
   }
   else
   {
     mutt_addrlist_to_intl (e->to, NULL);       /* XXX - IDNA error reporting? 
*/
     addstr (tmp);
   }
   addch ('\n');
@@ -278,17 +278,17 @@
     if (mutt_enter_string (tmp, sizeof (tmp), 4, 0) == 0)
     {
       rfc822_free_address (&e->cc);
       e->cc = mutt_parse_adrlist (e->cc, tmp);
       e->cc = mutt_expand_aliases (e->cc);
       tmp[0] = 0;
       mutt_addrlist_to_intl (e->cc, NULL);
       rfc822_write_address (tmp, sizeof (tmp), e->cc, 1);
-      mvaddstr (LINES - 1, 4, tmp);
+      mutt_window_mvaddstr (MuttMessageWindow, 0, 4, tmp);
     }
     else
       mutt_addrlist_to_intl (e->cc, NULL);
     addch ('\n');
   }
 
   if (option (OPTASKBCC) || force)
   {
@@ -299,17 +299,17 @@
     if (mutt_enter_string (tmp, sizeof (tmp), 5, 0) == 0)
     {
       rfc822_free_address (&e->bcc);
       e->bcc = mutt_parse_adrlist (e->bcc, tmp);
       e->bcc = mutt_expand_aliases (e->bcc);
       mutt_addrlist_to_intl (e->bcc, NULL);
       tmp[0] = 0;
       rfc822_write_address (tmp, sizeof (tmp), e->bcc, 1);
-      mvaddstr (LINES - 1, 5, tmp);
+      mutt_window_mvaddstr (MuttMessageWindow, 0, 5, tmp);
     }
     else
       mutt_addrlist_to_intl (e->bcc, NULL);
     addch ('\n');
   }
 }
 
 int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur)

Attachment: signature.asc
Description: PGP signature

Reply via email to