fix(substitute): don't crash with very large count (#39272)

(cherry picked from commit ac8459a09c)
This commit is contained in:
zeertzjq
2026-04-21 19:38:15 +08:00
committed by github-actions[bot]
parent 187a34d59b
commit ffb0ebb752
5 changed files with 10 additions and 8 deletions

View File

@@ -41,6 +41,10 @@ describe('Ex cmds', function()
'Vim(menu):E329: No menu "9999999999999999999999999999999999999999"',
pcall_err(command, ':menu 9999999999999999999999999999999999999999')
)
eq(
'Vim(substitute):E1510: Value too large: 9999999999999999999999999999999999999999',
pcall_err(command, ':%s/./b/9999999999999999999999999999999999999999')
)
assert_alive()
end)