* myslang.h: Define getyx() macro.

* layout.c (print_vfs_message): Preserve cursor position.
This commit is contained in:
Pavel Roskin 2002-11-15 01:35:12 +00:00
parent bb71be884a
commit f8267eb2a0
3 changed files with 16 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2002-11-14 Pavel Roskin <proski@gnu.org>
* myslang.h: Define getyx() macro.
* layout.c (print_vfs_message): Preserve cursor position.
* view.h: Make struct WView opaque, move non-interface parts ...
* view.c: ... here.
* layout.c: Use struct WView, not typedef WView.

View File

@ -822,12 +822,20 @@ void print_vfs_message (char *msg, ...)
return;
if (!message_visible || !the_hint || !the_hint->widget.parent) {
int col, row;
if (!nice_rotating_dash || (ok_to_refresh <= 0))
return;
/* Preserve current cursor position */
getyx (stdscr, row, col);
move (0, 0);
attrset (NORMAL_COLOR);
printw ("%-*s", COLS-1, str);
/* Restore cursor position */
move(row, col);
mc_refresh ();
return;
}

View File

@ -93,10 +93,13 @@ void slang_shell_mode (void);
void slang_shutdown (void);
int has_colors (void);
/* copied from slcurses.h (MC version 4.0.7) */
#define move(x, y) SLsmg_gotorc(x, y)
#define getyx(stdscr, row, col) \
do { \
row = SLsmg_get_row(); \
col = SLsmg_get_column(); \
} while (0)
#define printw SLsmg_printf
#define mvprintw(x, y, z) SLsmg_gotorc(x, y); SLsmg_printf(z)
#define COLS SLtt_Screen_Cols
#define LINES SLtt_Screen_Rows
#define standend() SLsmg_normal_video()