aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 92dbd693ea..35308b7411 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -11,7 +11,6 @@
#include <limits.h>
#include "nvim/ascii.h"
-#include "nvim/misc2.h"
#include "nvim/garray.h"
/*
@@ -4855,9 +4854,15 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start,
// recursive_regmatch(). Allow interrupting them with CTRL-C.
fast_breakcheck();
if (got_int) {
+#ifdef NFA_REGEXP_DEBUG_LOG
+ fclose(debug);
+#endif
return false;
}
if (nfa_time_limit != NULL && profile_passed_limit(*nfa_time_limit)) {
+#ifdef NFA_REGEXP_DEBUG_LOG
+ fclose(debug);
+#endif
return false;
}