- Disable VSTOP keystroke. Stops people accidentally locking up, nano (suggested by David Benbennick)

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1302 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Chris Allegretta 2002-10-15 00:27:55 +00:00
parent 492f8e62f0
commit e42df73644
2 changed files with 11 additions and 0 deletions

View File

@ -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:

9
nano.c
View File

@ -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)