Skip to content

Commit 40661a9

Browse files
committed
handle Ctrl+C
1 parent d0df725 commit 40661a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cq_editor/__main__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import signal
12
import sys
23
import argparse
34

@@ -23,6 +24,8 @@ def main():
2324
if args.filename:
2425
win.components['editor'].load_from_file(args.filename)
2526

27+
signal.signal(signal.SIGINT, signal.SIG_DFL) # handle Ctrl+C
28+
2629
win.show()
2730
sys.exit(app.exec_())
2831

0 commit comments

Comments
 (0)