commit e42df73644c82c657323d47a299f06cf44fdac39
parent 492f8e62f00c874b668bd35eabc6a88abffae1ca
Author: Chris Allegretta <chrisa@asty.org>
Date: Tue, 15 Oct 2002 00:27:55 +0000
- 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
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git 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
@@ -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)