aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-30 09:48:10 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-30 10:03:37 +0800
commita7dc48f19dcd6341cf5e9e199b3ad30e1b9f7327 (patch)
tree487ffa68b5924bcb076496444133334d5248c0b8 /src/nvim/ex_cmds.c
parentf706d24045b5243386460119bbf7c1caa2c5cc37 (diff)
downloadrneovim-a7dc48f19dcd6341cf5e9e199b3ad30e1b9f7327.tar.gz
rneovim-a7dc48f19dcd6341cf5e9e199b3ad30e1b9f7327.tar.bz2
rneovim-a7dc48f19dcd6341cf5e9e199b3ad30e1b9f7327.zip
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. https://github.com/vim/vim/commit/8bea171f154845046239c61bdef50a8e0f12f643 Cherry-pick test changes from patch 8.2.0557. https://github.com/vim/vim/commit/bfe13ccc58ccb96f243a58309800410db1ccb52c Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 2e524918a9..78d0435c9f 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -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);