projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
menu.c
diff --git
a/menu.c
b/menu.c
index
7a8c834
..
8ff8ace
100644
(file)
--- a/
menu.c
+++ b/
menu.c
@@
-158,14
+158,16
@@
static void menu_make_entry (char *s, int l, MUTTMENU *menu, int i)
void menu_pad_string (char *s, size_t n)
{
int shift = option (OPTARROWCURSOR) ? 3 : 0;
void menu_pad_string (char *s, size_t n)
{
int shift = option (OPTARROWCURSOR) ? 3 : 0;
- int cols = COLS - shift - SidebarWidth;
-
- char tmpbuf[n];
-
+ int cols;
+ char* tmpbuf = safe_malloc (n);
+ if (option(OPTMBOXPANE))
+ cols = COLS - shift - SidebarWidth;
+ else
+ cols = COLS - shift;
mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, strlen (s), 1);
tmpbuf[n - 1] = 0;
mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, strlen (s), 1);
tmpbuf[n - 1] = 0;
-
snprintf(s,n,"%s",tmpbuf); /* overkill */
snprintf(s,n,"%s",tmpbuf); /* overkill */
+ FREE(&tmpbuf);
}
void menu_redraw_full (MUTTMENU *menu)
}
void menu_redraw_full (MUTTMENU *menu)