openbsd-ports/editors/nano/patches/patch-nano_c
naddy 5d7f5588cd initial import of nano 0.9.11; ok espie@
nano is a small and easy-to-use editor in the fashion of pico
2000-06-24 14:31:37 +00:00

21 lines
730 B
Plaintext

$OpenBSD: patch-nano_c,v 1.1.1.1 2000/06/24 14:31:38 naddy Exp $
--- nano.c.orig Tue Jun 20 22:31:43 2000
+++ nano.c Thu Jun 22 23:22:07 2000
@@ -1708,12 +1708,10 @@ int main(int argc, char *argv[])
/* First back up the old settings so they can be restored, duh */
tcgetattr(0, &oldterm);
- /* Adam's code to blow away intr character so ^C can show cursor pos */
- tcgetattr(0, &term);
- for (i = 0; i < NCCS; i++) {
- if (term.c_cc[i] == CINTR || term.c_cc[i] == CQUIT)
- term.c_cc[i] = 0;
- }
+ term = oldterm;
+ term.c_cc[VINTR] = _POSIX_VDISABLE;
+ term.c_cc[VQUIT] = _POSIX_VDISABLE;
+ term.c_lflag &= ~IEXTEN;
tcsetattr(0, TCSANOW, &term);
/* now ncurses init stuff... */