Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last line is sometimes not rendered #49

Open
simonmandlik opened this issue Dec 7, 2024 · 0 comments
Open

Last line is sometimes not rendered #49

simonmandlik opened this issue Dec 7, 2024 · 0 comments

Comments

@simonmandlik
Copy link

I have noticed that the column on the last line is sometimes rendered and sometimes it isn't.

MWE:

local root = vim.fn.fnamemodify("./.repro", ":p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

local plugins = {
    spec = {
        {
            "lukas-reineke/virt-column.nvim",
            opts = {
                virtcolumn = "+1,+2,+3",
            },
        },
    }
}

require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.opt.textwidth = 10

Run nvim -u repro.lua.

  1. In insert mode, write return {\n}. This leads to this:
image
  1. In empty file again, write return {\n\n<BS>} in insert mode. This gives me:
image

Two buffers are identical, but virtual column is different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant