summaryrefslogtreecommitdiffstats
path: root/hdrline.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-06-07 13:27:45 -0700
committerKevin McCarthy <kevin@8t8.us>2016-06-07 13:27:45 -0700
commit0e3d502ea09ffae28b93e47a4dfb4db9471259b9 (patch)
tree9a4bc2ec6af4c88e62b47a2fbc521fc9665977ff /hdrline.c
parent744b38acd81bd547369a5eb1c06ae61a2416cda9 (diff)
Fix columns used for $status_format and $pager_format in the pager.
The code was hardcoding use of MuttIndexWindow->cols in mutt_make_string_info() and MuttStatusWindow->cols in menu_status_line(). Add a parameter to mutt_make_info_string(). Change menu_status_line() to use menu->statuswin->cols, falling back to MuttStatusWindow if no menu is passed in. Set menu->statuswin appropriately inside pager.c. Thanks to Richard Russon for tracking down this problem, and for the initial patch.
Diffstat (limited to 'hdrline.c')
-rw-r--r--hdrline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hdrline.c b/hdrline.c
index 93d64901..eef19e6c 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -758,7 +758,7 @@ _mutt_make_string (char *dest, size_t destlen, const char *s, CONTEXT *ctx, HEAD
}
void
-mutt_make_string_info (char *dst, size_t dstlen, const char *s, struct hdr_format_info *hfi, format_flag flags)
+mutt_make_string_info (char *dst, size_t dstlen, int cols, const char *s, struct hdr_format_info *hfi, format_flag flags)
{
- mutt_FormatString (dst, dstlen, 0, MuttIndexWindow->cols, s, hdr_format_str, (unsigned long) hfi, flags);
+ mutt_FormatString (dst, dstlen, 0, cols, s, hdr_format_str, (unsigned long) hfi, flags);
}