mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Do not duplicate alternate screen switching.
S-Lang already handles that in SLsmg_init_smg() and SLsmg_reset_smg(). Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
abb4996589
commit
c1975a3a35
@ -230,6 +230,30 @@ tty_shutdown (void)
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_enter_ca_mode (void)
|
||||
{
|
||||
if (mc_global.tty.xterm_flag && smcup != NULL)
|
||||
{
|
||||
fprintf (stdout, /* ESC_STR ")0" */ ESC_STR "7" ESC_STR "[?47h");
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_exit_ca_mode (void)
|
||||
{
|
||||
if (mc_global.tty.xterm_flag && rmcup != NULL)
|
||||
{
|
||||
fprintf (stdout, ESC_STR "[?47l" ESC_STR "8" ESC_STR "[m");
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_change_screen_size (void)
|
||||
{
|
||||
|
@ -363,6 +363,22 @@ tty_shutdown (void)
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_enter_ca_mode (void)
|
||||
{
|
||||
/* S-Lang handles alternate screen switching and cursor position saving */
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_exit_ca_mode (void)
|
||||
{
|
||||
/* S-Lang handles alternate screen switching and cursor position restoring */
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_change_screen_size (void)
|
||||
{
|
||||
|
@ -137,5 +137,8 @@ extern void tty_change_screen_size (void);
|
||||
|
||||
extern int mc_tty_normalize_lines_char (const char *);
|
||||
|
||||
extern void tty_enter_ca_mode (void);
|
||||
extern void tty_exit_ca_mode (void);
|
||||
|
||||
/*** inline functions ****************************************************************************/
|
||||
#endif /* MC_TTY_H */
|
||||
|
@ -92,30 +92,6 @@ anything_ready (void)
|
||||
/*** public functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_enter_ca_mode (void)
|
||||
{
|
||||
if (mc_global.tty.xterm_flag && smcup != NULL)
|
||||
{
|
||||
fprintf (stdout, /* ESC_STR ")0" */ ESC_STR "7" ESC_STR "[?47h");
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
tty_exit_ca_mode (void)
|
||||
{
|
||||
if (mc_global.tty.xterm_flag && rmcup != NULL)
|
||||
{
|
||||
fprintf (stdout, ESC_STR "[?47l" ESC_STR "8" ESC_STR "[m");
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
show_rxvt_contents (int starty, unsigned char y1, unsigned char y2)
|
||||
{
|
||||
|
@ -17,9 +17,6 @@
|
||||
|
||||
/*** declarations of public functions ************************************************************/
|
||||
|
||||
void tty_enter_ca_mode (void);
|
||||
void tty_exit_ca_mode (void);
|
||||
|
||||
void show_rxvt_contents (int starty, unsigned char y1, unsigned char y2);
|
||||
gboolean look_for_rxvt_extensions (void);
|
||||
|
||||
|
@ -35,9 +35,6 @@
|
||||
#include "lib/global.h"
|
||||
#include "lib/tty/tty.h" /* LINES, COLS */
|
||||
#include "lib/tty/color.h" /* tty_set_normal_attrs() */
|
||||
#ifdef HAVE_SLANG
|
||||
#include "lib/tty/win.h" /* tty_enter_ca_mode() */
|
||||
#endif
|
||||
#include "lib/widget.h"
|
||||
#include "lib/event.h"
|
||||
|
||||
@ -372,7 +369,6 @@ dialog_change_screen_size (void)
|
||||
tty_change_screen_size ();
|
||||
|
||||
#ifdef HAVE_SLANG
|
||||
tty_enter_ca_mode ();
|
||||
tty_keypad (TRUE);
|
||||
tty_nodelay (FALSE);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user