summaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-06-15 20:49:35 +0100
committerBram Moolenaar <Bram@vim.org>2022-06-15 20:49:35 +0100
commit8bea171f154845046239c61bdef50a8e0f12f643 (patch)
treeda8174d7704421002afd6c1b31c4ce21505d16ff /src/indent.c
parentcf65d88ff844f042337dfd043e6e98f3b9270577 (diff)
patch 8.2.5102: interrupt not caught in testv8.2.5102
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.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c
index f197027697..af23757a4a 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1781,8 +1781,10 @@ ex_retab(exarg_T *eap)
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)