mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:8.2.4359: crash when repeatedly using :retab
Problem: crash when repeatedly using :retab.
Solution: Bail out when the line is getting too long.
6e28703a8e
Cherry-pick e_resulting_text_too_long from v8.2.3492; put it in globals.h as
it will eventually be used in other files.
Add a modeline to test_retab.vim
This commit is contained in:
@@ -847,6 +847,10 @@ void ex_retab(exarg_T *eap)
|
||||
break;
|
||||
}
|
||||
vcol += win_chartabsize(curwin, ptr + col, (colnr_T)vcol);
|
||||
if (vcol >= MAXCOL) {
|
||||
emsg(_(e_resulting_text_too_long));
|
||||
break;
|
||||
}
|
||||
col += utfc_ptr2len(ptr + col);
|
||||
}
|
||||
if (new_line == NULL) { // out of memory
|
||||
|
Reference in New Issue
Block a user