listener: enable ctrl-break interruption only while user code is running

char-rename
Alexander Iljin 2016-05-31 00:58:13 +03:00 committed by John Benediktsson
parent 0245a93bee
commit d8f273f35b
1 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ H{
M: object prompt.
nip prompt-style get-global format bl flush ;
: with-ctrl-break ( quot -- )
enable-ctrl-break
[ disable-ctrl-break ] [ ] cleanup ; inline
: parse-lines-interactive ( lines -- quot/f )
[ parse-lines ] with-compilation-unit ;
@ -120,7 +124,7 @@ t error-summary? set-global
[
read-quot [
'[ datastack _ with-datastack ]
'[ [ datastack _ with-datastack ] with-ctrl-break ]
[ call-error-hook datastack ]
recover
] [ return ] if*