Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

fix(inlay_hints): disable strict_indexing for nvim_buf_get_lines #353

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/rust-tools/inlay_hints.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ local function parse_hints(result, bufnr)
end

local line_len =
string.len(vim.api.nvim_buf_get_lines(bufnr, line, line + 1, true)[1])
string.len(vim.api.nvim_buf_get_lines(bufnr, line, line + 1, false)[1] or "")
max_line_len = math.max(max_line_len, line_len)

add_line()
Expand Down