You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the extmark remains .invalid=true and no highlighting, after undo.
Steps to reproduce
test.lua
local api = vim.api
local ns = api.nvim_create_namespace("xxx")
local bufnr = api.nvim_get_current_buf()
api.nvim_buf_set_lines(bufnr, 0, -1, false, { "abcdefgh" })
local lnum = 0
local ids = {}
for i, col in ipairs({ 2, 5 }) do
--stylua: ignore start
local id = api.nvim_buf_set_extmark(bufnr, ns, lnum, col, {
end_row = lnum, end_col = col + 2,
hl_group = "Search", hl_mode = "replace", --to spot the problem easily
right_gravity = false,
invalidate = true, undo_restore = true,
})
--stylua: ignore start
ids[i] = id
end
print("ns", ns, "ids", table.concat(ids, ","))
nvim --clean -u NONE +'so test.lua' # it happend to be 'ns=1, ids=1,2' on my side
Problem
the extmark remains
.invalid=true
and no highlighting, after undo.Steps to reproduce
:lua =vim.api.nvim_buf_get_extmark_by_id(0, 1, 1, {details=true}
xxxx
, `:lua =vim.api.nvim_buf_get_extmark_by_id(0, 1, 1, {details=true})4u
,:lua =vim.api.nvim_buf_get_extmark_by_id(0, 1, 1, {details=true})
Expected behavior
after
4u
, the extmark is valid and gets highlight back.Neovim version (nvim -v)
nvim 0.10
Vim (not Nvim) behaves the same?
N/A
Operating system/version
archlinux
Terminal name/version
st 0.9
$TERM environment variable
tmux-256color
Installation
pacman
The text was updated successfully, but these errors were encountered: