X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=pager.c;h=5f93d966a044cd6c87d74340c2154643788ca2a4;hb=dd5354f76c36f71044f6ddeee61241691c7195ff;hp=dd1a621ad5a2578b354c5428971cae75c15eacb0;hpb=a30218f8b3d68023d354d75b7c4674ae0c528f28;p=apps%2Fmadmutt.git diff --git a/pager.c b/pager.c index dd1a621..5f93d96 100644 --- a/pager.c +++ b/pager.c @@ -108,13 +108,11 @@ typedef struct _ansi_attr { static short InHelp = 0; -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) static struct resize { int line; int SearchCompiled; int SearchBack; } *Resize = NULL; -#endif #define NumSigLines 4 @@ -1231,14 +1229,6 @@ display_line (FILE * f, off_t *last_pos, struct line_t **lineInfo, int n, /* display the line */ format_line (lineInfo, n, buf, flags, &a, cnt, &ch, &vch, &col, &special); - /* avoid a bug in ncurses... */ -#ifndef USE_SLANG_CURSES - if (col == 0) { - SETCOLOR (MT_COLOR_NORMAL); - addch (' '); - } -#endif - /* end the last color pattern (needed by S-Lang) */ if (special || (col != COLS && (flags & (M_SHOWCOLOR | M_SEARCH)))) resolve_color (*lineInfo, n, vch, flags, 0, &a); @@ -1260,15 +1250,7 @@ display_line (FILE * f, off_t *last_pos, struct line_t **lineInfo, int n, bkgdset (def_color | ' '); #endif } - - /* ncurses always wraps lines when you get to the right side of the - * screen, but S-Lang seems to only wrap if the next character is *not* - * a newline (grr!). - */ -#ifndef USE_SLANG_CURSES - if (col < COLS) -#endif - addch ('\n'); + addch ('\n'); /* * reset the color back to normal. This *must* come after the @@ -1298,31 +1280,6 @@ static int upNLines (int nlines, struct line_t *info, int cur, int hiding) return cur; } -static struct mapping_t PagerHelp[] = { - {N_("Exit"), OP_EXIT}, - {N_("PrevPg"), OP_PREV_PAGE}, - {N_("NextPg"), OP_NEXT_PAGE}, - {NULL, 0} -}; -static struct mapping_t PagerHelpExtra[] = { - {N_("View Attachm."), OP_VIEW_ATTACHMENTS}, - {N_("Del"), OP_DELETE}, - {N_("Reply"), OP_REPLY}, - {N_("Next"), OP_MAIN_NEXT_UNDELETED}, - {NULL, 0} -}; - -#ifdef USE_NNTP -static struct mapping_t PagerNewsHelpExtra[] = { - {N_("Post"), OP_POST}, - {N_("Followup"), OP_FOLLOWUP}, - {N_("Del"), OP_DELETE}, - {N_("Next"), OP_MAIN_NEXT_UNDELETED}, - {NULL, 0} -}; -#endif - - /* This pager is actually not so simple as it once was. It now operates in two modes: one for viewing messages and the other for viewing help. These can be distinguished by whether or not ``hdr'' is NULL. The ``hdr'' arg @@ -1333,8 +1290,6 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) { static char searchbuf[STRING]; char buffer[LONG_STRING]; - char helpstr[STRING * 2]; - char tmphelp[STRING * 2]; int maxLine, lastLine = 0; struct line_t *lineInfo; struct q_class_t *QuoteList = NULL; @@ -1397,23 +1352,6 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) (lineInfo[i].syntax)[0].first = (lineInfo[i].syntax)[0].last = -1; } - mutt_compile_help (helpstr, sizeof(helpstr), MENU_PAGER, PagerHelp); - if (IsHeader (extra)) { - m_strcpy(tmphelp, sizeof(tmphelp), helpstr); - mutt_compile_help (buffer, sizeof(buffer), MENU_PAGER, -#ifdef USE_NNTP - (Context - && (Context->magic == M_NNTP)) ? PagerNewsHelpExtra : -#endif - PagerHelpExtra); - snprintf (helpstr, sizeof (helpstr), "%s %s", tmphelp, buffer); - } - if (!InHelp) { - m_strcpy(tmphelp, sizeof(tmphelp), helpstr); - mutt_make_help (buffer, sizeof(buffer), _("Help"), MENU_PAGER, OP_HELP); - snprintf (helpstr, sizeof(helpstr), "%s %s", tmphelp, buffer); - } - while (ch != -1) { mutt_curs_set (0); imap_keepalive (); @@ -1452,11 +1390,10 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) if (option (OPTHELP)) { SETCOLOR (MT_COLOR_STATUS); move (helpoffset, SW); - mutt_paddstr (COLS-SW, helpstr); + mutt_paddstr (COLS-SW, ""); SETCOLOR (MT_COLOR_NORMAL); } -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) if (Resize != NULL) { if ((SearchCompiled = Resize->SearchCompiled)) { REGCOMP @@ -1469,7 +1406,6 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) p_delete(&Resize); } -#endif if (IsHeader (extra) && PagerIndexLines) { if (pager_index == NULL) { @@ -1639,7 +1575,6 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) mutt_query_exit (); continue; } -#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM) else if (SigWinch) { mutt_resize_screen (); @@ -1683,7 +1618,6 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) clearok (stdscr, TRUE); /*force complete redraw */ continue; } -#endif else if (ch == -1) { ch = 0; continue;