1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Withdraw support for the DECEDM escape sequence.

Having decided that the terminal's local echo setting shouldn't be
allowed to propagate through to termios, I think the local edit
setting shouldn't either. Also, no other terminal emulator I know
seems to implement this sequence, and if you enable it, things get
very confused in general. I think it's generally better off absent; if
somebody turns out to have been using it, then we'll at least be able
to find out what it's good for.
This commit is contained in:
Simon Tatham 2019-06-17 20:49:46 +01:00
parent 9fccb065a6
commit e3a14e1ad6
6 changed files with 2 additions and 29 deletions

View File

@ -15,12 +15,10 @@
#define ECHOING (ldisc->localecho == FORCE_ON || \ #define ECHOING (ldisc->localecho == FORCE_ON || \
(ldisc->localecho == AUTO && \ (ldisc->localecho == AUTO && \
(backend_ldisc_option_state(ldisc->backend, LD_ECHO) || \ (backend_ldisc_option_state(ldisc->backend, LD_ECHO))))
term_ldisc(ldisc->term, LD_ECHO))))
#define EDITING (ldisc->localedit == FORCE_ON || \ #define EDITING (ldisc->localedit == FORCE_ON || \
(ldisc->localedit == AUTO && \ (ldisc->localedit == AUTO && \
(backend_ldisc_option_state(ldisc->backend, LD_EDIT) || \ (backend_ldisc_option_state(ldisc->backend, LD_EDIT))))
term_ldisc(ldisc->term, LD_EDIT))))
static void c_write(Ldisc *ldisc, const void *buf, int len) static void c_write(Ldisc *ldisc, const void *buf, int len)
{ {

View File

@ -1630,7 +1630,6 @@ void term_invalidate(Terminal *);
void term_blink(Terminal *, bool set_cursor); void term_blink(Terminal *, bool set_cursor);
void term_do_paste(Terminal *, const wchar_t *, int); void term_do_paste(Terminal *, const wchar_t *, int);
void term_nopaste(Terminal *); void term_nopaste(Terminal *);
bool term_ldisc(Terminal *, int option);
void term_copyall(Terminal *, const int *, int); void term_copyall(Terminal *, const int *, int);
void term_reconfig(Terminal *, Conf *); void term_reconfig(Terminal *, Conf *);
void term_request_copy(Terminal *, const int *clipboards, int n_clipboards); void term_request_copy(Terminal *, const int *clipboards, int n_clipboards);

View File

@ -1341,7 +1341,6 @@ static void power_on(Terminal *term, bool clear)
term->alt_save_attr = term->curr_attr = ATTR_DEFAULT; term->alt_save_attr = term->curr_attr = ATTR_DEFAULT;
term->curr_truecolour.fg = term->curr_truecolour.bg = optionalrgb_none; term->curr_truecolour.fg = term->curr_truecolour.bg = optionalrgb_none;
term->save_truecolour = term->alt_save_truecolour = term->curr_truecolour; term->save_truecolour = term->alt_save_truecolour = term->curr_truecolour;
term->term_editing = false;
term->app_cursor_keys = conf_get_bool(term->conf, CONF_app_cursor); term->app_cursor_keys = conf_get_bool(term->conf, CONF_app_cursor);
term->app_keypad_keys = conf_get_bool(term->conf, CONF_app_keypad); term->app_keypad_keys = conf_get_bool(term->conf, CONF_app_keypad);
term->use_bce = conf_get_bool(term->conf, CONF_bce); term->use_bce = conf_get_bool(term->conf, CONF_bce);
@ -2639,11 +2638,6 @@ static void toggle_mode(Terminal *term, int mode, int query, bool state)
case 8: /* DECARM: auto key repeat */ case 8: /* DECARM: auto key repeat */
term->repeat_off = !state; term->repeat_off = !state;
break; break;
case 10: /* DECEDM: set local edit mode */
term->term_editing = state;
if (term->ldisc) /* cause ldisc to notice changes */
ldisc_echoedit_update(term->ldisc);
break;
case 25: /* DECTCEM: enable/disable cursor */ case 25: /* DECTCEM: enable/disable cursor */
compatibility2(OTHER, VT220); compatibility2(OTHER, VT220);
term->cursor_on = state; term->cursor_on = state;
@ -7025,15 +7019,6 @@ void term_lost_clipboard_ownership(Terminal *term, int clipboard)
term_out(term); term_out(term);
} }
bool term_ldisc(Terminal *term, int option)
{
if (option == LD_ECHO)
return false;
if (option == LD_EDIT)
return term->term_editing;
return false;
}
static void term_added_data(Terminal *term) static void term_added_data(Terminal *term)
{ {
if (!term->in_term_out) { if (!term->in_term_out) {

View File

@ -123,7 +123,6 @@ struct terminal_tag {
bool cblinker; /* When blinking is the cursor on ? */ bool cblinker; /* When blinking is the cursor on ? */
bool tblinker; /* When the blinking text is on */ bool tblinker; /* When the blinking text is on */
bool blink_is_real; /* Actually blink blinking text */ bool blink_is_real; /* Actually blink blinking text */
bool term_editing; /* Does terminal want local edit? */
int sco_acs, save_sco_acs; /* CSI 10,11,12m -> OEM charset */ int sco_acs, save_sco_acs; /* CSI 10,11,12m -> OEM charset */
bool vt52_bold; /* Force bold on non-bold colours */ bool vt52_bold; /* Force bold on non-bold colours */
bool utf; /* Are we in toggleable UTF-8 mode? */ bool utf; /* Are we in toggleable UTF-8 mode? */

View File

@ -79,10 +79,6 @@ char *x_get_default(const char *key)
{ {
return NULL; /* this is a stub */ return NULL; /* this is a stub */
} }
bool term_ldisc(Terminal *term, int mode)
{
return false;
}
static void plink_echoedit_update(Seat *seat, bool echo, bool edit) static void plink_echoedit_update(Seat *seat, bool echo, bool edit)
{ {
/* Update stdin read mode to reflect changes in line discipline. */ /* Update stdin read mode to reflect changes in line discipline. */

View File

@ -43,10 +43,6 @@ WSAEVENT netevent;
static Backend *backend; static Backend *backend;
Conf *conf; Conf *conf;
bool term_ldisc(Terminal *term, int mode)
{
return false;
}
static void plink_echoedit_update(Seat *seat, bool echo, bool edit) static void plink_echoedit_update(Seat *seat, bool echo, bool edit)
{ {
/* Update stdin read mode to reflect changes in line discipline. */ /* Update stdin read mode to reflect changes in line discipline. */