aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-30 09:46:03 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-30 09:47:12 +0800
commitec52658af7984188d0d4c77045f629d647d5cf37 (patch)
tree35d097e9d611e096652e8548b58027d62666bc9e
parentd311c5481dede47d752fa39cb00d728ba18ef5bc (diff)
downloadrneovim-ec52658af7984188d0d4c77045f629d647d5cf37.tar.gz
rneovim-ec52658af7984188d0d4c77045f629d647d5cf37.tar.bz2
rneovim-ec52658af7984188d0d4c77045f629d647d5cf37.zip
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 <Bram@vim.org>
-rw-r--r--src/nvim/ex_cmds.c2
1 files changed, 2 insertions, 0 deletions
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);