summaryrefslogtreecommitdiff
path: root/graphics/asymptote/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/main.cc')
-rw-r--r--graphics/asymptote/main.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/graphics/asymptote/main.cc b/graphics/asymptote/main.cc
index 0728ebcdaf..5f440c24c7 100644
--- a/graphics/asymptote/main.cc
+++ b/graphics/asymptote/main.cc
@@ -54,6 +54,12 @@
#include "stack.h"
+#ifdef HAVE_LIBCURSES
+#ifdef HAVE_LIBREADLINE
+#include <readline/readline.h>
+#endif
+#endif
+
using namespace settings;
using interact::interactive;
@@ -245,6 +251,9 @@ void *asymain(void *A)
void exitHandler(int)
{
+#if defined(HAVE_READLINE) && defined(HAVE_LIBCURSES)
+ rl_cleanup_after_signal();
+#endif
exit(returnCode());
}