aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_async.lua
diff options
context:
space:
mode:
authorVolodymyr Chernetskyi <volodymyr_chernetskyi@goodyear.com>2026-09-06 17:24:52 +0200
committerGitHub <noreply@github.com>2026-09-06 11:24:52 -0400
commite8a0b400d8d35d994d2b2ef639566f6d36ecc729 (patch)
tree83bf6588debc89b3b03b3f491dc7f8a0cae4c37e /runtime/lua/vim/_async.lua
parentbd43394d4e6f3629054361e7312c7886ae00380f (diff)
downloadrneovim-e8a0b400d8d35d994d2b2ef639566f6d36ecc729.tar.gz
rneovim-e8a0b400d8d35d994d2b2ef639566f6d36ecc729.tar.bz2
rneovim-e8a0b400d8d35d994d2b2ef639566f6d36ecc729.zip
fix(statusline): "%.0" renders garbage #41685
Problem: `getdigits_int(pp, strict, def)` returns `def` only when the number fails to parse or overflows, never when the text parses to a literal `0`, so `%.0` leaves `maxwid` at 0. Both render paths then break down: `l > maxwid` is always true and `while (l >= maxwid)` consumes the whole string, so `%.0f` comes out as `<` and `%.0l` as `0>3`. Vim guards for this right after the same call. Nvim had the guard too until 3344cffe7b ("getdigits: introduce `strict`, `def` parameters"), which folded it into the new `def` argument and so changed what a literal zero means. The neighbouring `minwid` call was translated correctly. Solution: Fall back to 50 when the parsed width is not positive, as Vim does. AI-assisted
Diffstat (limited to 'runtime/lua/vim/_async.lua')
0 files changed, 0 insertions, 0 deletions