patch 8.2.5102: interrupt not caught in test
Problem: Interrupt not caught in test.
Solution: Consider an exception thrown in the current try/catch when got_int
is set. Also catch early exit when not using try/catch.
diff --git a/src/indent.c b/src/indent.c
index f197027..af23757 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1781,8 +1781,10 @@
if (vcol >= MAXCOL)
{
emsg(_(e_resulting_text_too_long));
- // set got_int to break out of any loop
- got_int = TRUE;
+ // when not inside a try/catch set got_int to break out of any
+ // loop
+ if (trylevel == 0)
+ got_int = TRUE;
break;
}
if (has_mbyte)