summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/signal.c b/signal.c
index 49c843d34d2e..dd666832e3f5 100644
--- a/signal.c
+++ b/signal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1984-2020 Mark Nudelman
+ * Copyright (C) 1984-2021 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -33,6 +33,7 @@ extern int linenums;
extern int wscroll;
extern int reading;
extern int quit_on_intr;
+extern int secure;
extern long jump_sline_fraction;
/*
@@ -59,6 +60,9 @@ u_interrupt(type)
if (kbhit())
getkey();
#endif
+#if HILITE_SEARCH
+ set_filter_pattern(NULL, 0);
+#endif
if (reading)
intread(); /* May longjmp */
}
@@ -121,6 +125,9 @@ wbreak_handler(dwCtrlType)
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
sigs |= S_INTERRUPT;
+#if HILITE_SEARCH
+ set_filter_pattern(NULL, 0);
+#endif
return (TRUE);
default:
break;
@@ -154,7 +161,7 @@ init_signals(on)
(void) LSIGNAL(SIGINT, u_interrupt);
#endif
#ifdef SIGTSTP
- (void) LSIGNAL(SIGTSTP, stop);
+ (void) LSIGNAL(SIGTSTP, secure ? SIG_IGN : stop);
#endif
#ifdef SIGWINCH
(void) LSIGNAL(SIGWINCH, winch);