From ec52658af7984188d0d4c77045f629d647d5cf37 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 30 Nov 2022 09:46:03 +0800 Subject: vim-patch:8.2.5080: when indenting gets out of hand it is hard to stop Problem: When indenting gets out of hand it is hard to stop. Solution: When line gets too long set got_int. https://github.com/vim/vim/commit/a7ac4c9c395d64059437e37045fa0ad5f9fecb0b Co-authored-by: Bram Moolenaar --- src/nvim/ex_cmds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 96e61c13fb..2e524918a9 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -847,6 +847,8 @@ 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; break; } col += utfc_ptr2len(ptr + col); -- cgit