X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=curs_main.c;h=1f2c605fbfd32aad1f74660474c852f843851f9f;hp=757b0069c745e44b7a3af49406a1f359bf656ff0;hb=e83ad1be25aefea3ed21ec08edbaf2d5a72c4a9d;hpb=814a01519c9605d479201b99eb16c97b0ad8635d diff --git a/curs_main.c b/curs_main.c index 757b006..1f2c605 100644 --- a/curs_main.c +++ b/curs_main.c @@ -23,6 +23,7 @@ #include "buffy.h" #include "mx.h" #include "sidebar.h" +#include "xterm.h" #ifdef USE_POP #include "pop.h" @@ -100,22 +101,6 @@ static const char *No_visible = N_("No visible messages."); 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 = @@ -578,9 +563,9 @@ int mutt_index_menu (void) 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); } } @@ -592,6 +577,8 @@ int mutt_index_menu (void) 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 (); @@ -1203,7 +1190,8 @@ int mutt_index_menu (void) { 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) { @@ -1225,7 +1213,6 @@ int mutt_index_menu (void) 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; @@ -1270,6 +1257,7 @@ int mutt_index_menu (void) } else menu->current = 0; + sidebar_set_current (buf); #ifdef USE_NNTP /* buffy_check() must be done with mail-reader mode! */