vim-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.

8bea171f15

Cherry-pick test changes from patch 8.2.0557.

bfe13ccc58

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-30 09:48:10 +08:00
parent f706d24045
commit a7dc48f19d
7 changed files with 42 additions and 25 deletions

View File

@@ -847,8 +847,11 @@ void ex_retab(exarg_T *eap)
vcol += win_chartabsize(curwin, ptr + col, (colnr_T)vcol);
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;
}
col += utfc_ptr2len(ptr + col);