Encapsulate a curses function to reduce dependencies.
This function works with absolute screen coordinates rather than coords
based on a MuttWindow. This function should be eliminated soon.
size_t n = mutt_str_strlen((char *) s);
mbstate_t mbstate;
- if (!stdscr)
- return;
-
memset(&mbstate, 0, sizeof(mbstate));
while (*s)
{
{
mutt_curses_set_color(MT_COLOR_NORMAL);
/* clear() doesn't optimize screen redraws */
- move(0, 0);
+ mutt_window_move_abs(0, 0);
mutt_window_clrtobot();
if (C_Help)
else
{
CurrentMenu = MENU_MAIN;
- move(0, 0);
+ mutt_window_move_abs(0, 0);
mutt_window_clrtobot();
}
}
return addstr(str);
#endif
}
+
+/**
+ * mutt_window_move_abs - Move the cursor to an absolute screen position
+ * @param row Screen row (0-based)
+ * @param col Screen column (0-based)
+ */
+void mutt_window_move_abs(int row, int col)
+{
+ move(row, col);
+}
void mutt_window_clrtobot (void);
void mutt_window_clrtoeol (struct MuttWindow *win);
int mutt_window_move (struct MuttWindow *win, int row, int col);
+void mutt_window_move_abs (int row, int col);
int mutt_window_mvaddstr (struct MuttWindow *win, int row, int col, const char *str);
int mutt_window_mvprintw (struct MuttWindow *win, int row, int col, const char *fmt, ...);
{
mutt_curses_set_color(MT_COLOR_NORMAL);
/* clear() doesn't optimize screen redraws */
- move(0, 0);
+ mutt_window_move_abs(0, 0);
mutt_window_clrtobot();
if (IsEmail(rd->extra) && Context && ((Context->mailbox->vcount + 1) < C_PagerIndexLines))
{
if (braille_line != -1)
{
- move(braille_line + 1, 0);
+ mutt_window_move_abs(braille_line + 1, 0);
braille_line = -1;
}
}
}
draw_sidebar(num_rows, num_cols, div_width);
- move(y, x);
+ mutt_window_move_abs(y, x);
}
/**