Skip to content

Last line is sometimes not rendered #49

@simonmandlik

Description

@simonmandlik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions