aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/options.c
diff options
context:
space:
mode:
authorArtem <vanaigranov@gmail.com>2024-12-25 14:12:40 -0600
committerGitHub <noreply@github.com>2024-12-25 21:12:40 +0100
commit487c48ec8689b865bad04fdb87b61f5ada25da97 (patch)
tree2dd0245dc458792b7ae5b3a989bbbc1a34d0c5ef /src/nvim/api/options.c
parent7567f7d3226ab247eb2b743460492c1101045b0e (diff)
downloadrneovim-487c48ec8689b865bad04fdb87b61f5ada25da97.tar.gz
rneovim-487c48ec8689b865bad04fdb87b61f5ada25da97.tar.bz2
rneovim-487c48ec8689b865bad04fdb87b61f5ada25da97.zip
fix(api): clamp range lines in `nvim__redraw()` (#31710)
Problem: `nvim__redraw()` doesn't clamp the lines in the `range` parameter before truncating to int. The resulting range may be empty when the original range contained buffer lines and vice versa. E.g. for a buffer with 4 lines, these are the redrawn lines: ```lua { 2, 2 ^ 31 } -> none (should be { 2, 3 }) { 2, 2 ^ 32 } -> none (should be { 2, 3 }) { 2 ^ 32 - 1, 2 } -> { 0, 1 } (should be none) ``` Solution: Clamp `range` values before truncating to int.
Diffstat (limited to 'src/nvim/api/options.c')
0 files changed, 0 insertions, 0 deletions