From: Rocco Rutte Date: Wed, 3 Jun 2009 19:58:32 +0000 (+0200) Subject: Don't abuse $pager_context for searches, add $search_context. See #976. X-Git-Tag: neomutt-20160307~604 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f7ef8ec4a7ba1be2a1b5f1b9439d9aa2b7fa1e1;p=neomutt Don't abuse $pager_context for searches, add $search_context. See #976. --- diff --git a/UPDATING b/UPDATING index acf6bb401..69b0367c6 100644 --- a/UPDATING +++ b/UPDATING @@ -6,7 +6,8 @@ The keys used are: hg tip: + $honor_disposition to honor Content-Disposition headers - ! $pager_context specifies number of search context lines, too + + $search_context specifies number of context lines for search results + in pager/page-based menus + ssl_use_sslv2 defaults to no + uncolor works for header + body objects, too + the "flagged" and "replied" flags are enabled/supported for diff --git a/globals.h b/globals.h index 5be02376f..94aa457c5 100644 --- a/globals.h +++ b/globals.h @@ -113,6 +113,7 @@ WHERE char *PrintCmd; WHERE char *QueryCmd; WHERE char *QueryFormat; WHERE char *Realname; +WHERE short SearchContext; WHERE char *SendCharset; WHERE char *Sendmail; WHERE char *Shell; diff --git a/init.h b/init.h index ff2a54fec..b916d21f5 100644 --- a/init.h +++ b/init.h @@ -2429,6 +2429,12 @@ struct option_t MuttVars[] = { ** mutt scores are always greater than or equal to zero, the default setting ** of this variable will never mark a message read. */ + { "search_context", DT_NUM, R_NONE, UL &SearchContext, UL 0 }, + /* + ** .pp + ** For the pager, this variable specifies the number of lines shown + ** before search results. By default, search results will be top-aligned. + */ { "send_charset", DT_STR, R_NONE, UL &SendCharset, UL "us-ascii:iso-8859-1:utf-8" }, /* ** .pp diff --git a/pager.c b/pager.c index 8ddba66d4..61fe0965b 100644 --- a/pager.c +++ b/pager.c @@ -1988,8 +1988,8 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) { wrapped = 0; - if (PagerContext > 0 && PagerContext < LINES - 2 - option (OPTHELP) ? 1 : 0) - searchctx = PagerContext; + if (SearchContext > 0 && SearchContext < LINES - 2 - option (OPTHELP) ? 1 : 0) + searchctx = SearchContext; else searchctx = 0; @@ -2157,8 +2157,8 @@ search_next: { SearchFlag = M_SEARCH; /* give some context for search results */ - if (PagerContext > 0 && PagerContext < LINES - 2 - option (OPTHELP) ? 1 : 0) - searchctx = PagerContext; + if (SearchContext > 0 && SearchContext < LINES - 2 - option (OPTHELP) ? 1 : 0) + searchctx = SearchContext; else searchctx = 0; if (topline - searchctx > 0)