diff --git a/ChangeLog b/ChangeLog index e4752e447af50a0a2f6450d81ffce41096ea59d3..05ade5268ba67d868bd3c2e3a6ed7810aa9f6a66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ CVS code - - Added Meta-Y toggle to disable/enable color syntax highlighting completely. This may eventually be per-buffer, but that's too complicated for a feature freeze. + - Disable VSTOP keystroke. Stops people accidentally locking up + nano (suggested by David Benbennick). GNU nano 1.1.11 - 10/01/2002 - General: diff --git a/nano.c b/nano.c index 538099ddf966ca57bf4b9c192683912e72912a41..88928e178dfb3b9edd51099769adc6de2bea9c85 100644 --- a/nano.c +++ b/nano.c @@ -2642,6 +2642,9 @@ void signal_init(void) #ifdef _POSIX_VDISABLE tcgetattr(0, &term); + /* Ignore ^s, much to Chris' chagrin */ + term.c_cc[VSTOP] = _POSIX_VDISABLE; + #ifdef VDSUSP term.c_cc[VDSUSP] = _POSIX_VDISABLE; #endif /* VDSUSP */ @@ -3488,6 +3491,12 @@ int main(int argc, char *argv[]) break; } } + +#ifdef _POSIX_VDISABLE + /* Don't even think about changing this string */ + if (kbinput == 19) + statusbar(_("XOFF ignored, mumble mumble.")); +#endif /* If we're in raw mode or using Alt-Alt-x, we have to catch Control-S and Control-Q */ if (kbinput == 17 || kbinput == 19)