Skip to content

Bug: The window pinned by stickybuf.nvim might be covered by empty buffer. #30

@nullptr-yxw

Description

@nullptr-yxw

Neovim version (nvim -v)

NVIM v0.10.0-dev-2526+g6525832a8

Operating system/version

Windows 11

Describe the bug

The window pinned by stickybuf.nvim might be covered by empty buffer.

issue.mp4

What is the severity of this bug?

tolerable (can work around it)

Steps To Reproduce

  1. create a empty file called empty.txt
  2. nvim -u repro.lua empty.txt
  3. Do what I do in the video, and find that the help window, which should be pinned by the stickybuf.nvim, will be covered by empty buffer. And if I type some words in the empty buffer, the help window will not be covered.

Expected Behavior

The window pinned by stickybuf.nvim should not be covered by empty buffer.

Minimal init.lua

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
        vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
        vim.fn.system({
                "git",
                "clone",
                "--filter=blob:none",
                "--single-branch",
                "https://github.com/folke/lazy.nvim.git",
                lazypath,
        })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
        -- add any other plugins here
    {
        "tevearc/stickybuf.nvim",
        opts = {},
    }
}
require("lazy").setup(plugins, {
        root = root .. "/plugins",
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions