Skip to content

Commit

Permalink
fix(select): off-by-one error in text highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Dec 19, 2021
1 parent 8d19119 commit 4b677be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/dressing/select/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ M.select = function(config, items, opts, on_choice)
vim.api.nvim_buf_set_lines(bufnr, 0, -1, true, lines)
vim.api.nvim_buf_set_option(bufnr, "modifiable", false)
local ns = vim.api.nvim_create_namespace("DressingWindow")
for i = 1, #lines, 1 do
for i = 0, #lines - 1, 1 do
vim.api.nvim_buf_add_highlight(bufnr, ns, "DressingSelectText", i, 0, -1)
end
local width = util.calculate_width(max_width, config)
Expand Down

0 comments on commit 4b677be

Please sign in to comment.