#include "buffy.h"
#include "mx.h"
#include "sidebar.h"
+#include "xterm.h"
#ifdef USE_POP
#include "pop.h"
#include "lib/mem.h"
#include "lib/intl.h"
#include "lib/str.h"
+#include "lib/debug.h"
#include <ctype.h>
#include <stdlib.h>
extern const char *ReleaseDate;
extern size_t UngetCount;
-static void set_xterm_title_bar (char *title)
-{
- fputs ("\033]2;", stdout);
- fputs (title, stdout);
- fputs ("\007", stdout);
- fflush (stdout);
-}
-
-static void set_xterm_icon_name (char *name)
-{
- fputs ("\033]1;", stdout);
- fputs (name, stdout);
- fputs ("\007", stdout);
- fflush (stdout);
-}
-
void index_make_entry (char *s, size_t l, MUTTMENU * menu, int num)
{
format_flag flag =
menu->redraw &= ~REDRAW_STATUS;
if (option (OPTXTERMSETTITLES)) {
menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle));
- set_xterm_title_bar (buf);
+ mutt_xterm_set_title (buf);
menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon));
- set_xterm_icon_name (buf);
+ mutt_xterm_set_icon (buf);
}
}
if (option (OPTARROWCURSOR))
move (menu->current - menu->top + menu->offset, 2);
+ else if (option (OPTBRAILLEFRIENDLY))
+ move (menu->current - menu->top + menu->offset, 0);
else
move (menu->current - menu->top + menu->offset, COLS - 1);
mutt_refresh ();
op = km_dokey (MENU_MAIN);
- dprint (4,
- (debugfile, "mutt_index_menu[%d]: Got op %d\n", __LINE__, op));
+ debug_print (4, ("Got op %d\n", op));
#if defined (USE_SLANG_CURSES) || defined (HAVE_RESIZETERM)
if (SigWinch) {
{
if (Context && Context->path)
strncpy (buf, Context->path, sizeof (buf));
- buffy_next (buf, sizeof (buf));
+ if (op != OP_SIDEBAR_OPEN)
+ buffy_next (buf, sizeof (buf));
}
if (op == OP_SIDEBAR_OPEN) {
else
#endif
mutt_expand_path (buf, sizeof (buf));
- sidebar_set_current (buf);
if (mx_get_magic (buf) <= 0) {
mutt_error (_("%s is not a mailbox."), buf);
break;
}
else
menu->current = 0;
+ sidebar_set_current (buf);
#ifdef USE_NNTP
/* buffy_check() must be done with mail-reader mode! */