Skip to content

bug: After deleting lines in quickfix buffer jumps to remaining entries in quickfix are inconsistent #60

Open

Description

@chancez

Neovim version (nvim -v)

NVIM v0.11.4

Operating system/version

MacOS 15.6.1

Describe the bug

If you delete entries from the quickfix window, then try to jump to an entry from the quickfix by pressing enter, the entry you jump to is not the one selected, but the one that was in that position before being deleted.

What is the severity of this bug?

breaking (some functionality is broken)

Steps To Reproduce

  1. Open quickfix
  2. Delete some entries in the quickfix list.
  3. Press enter on a quickfix entry that is in a new location after the previous entries were deleted
  4. See that the entry you jumped to is not the one you selected

Expected Behavior

I expect to delete lines in the quickfix window that I don't care about, then be able to jump to the remaining entries.

Minimal example file

No response

Minimal init.lua

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "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 = {
  "folke/tokyonight.nvim",
  {
    "stevearc/quicker.nvim",
    config = function()
      require("quicker").setup({
        -- add your config here
      })
    end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here

Additional context

No response

Activity

  1. 231tr0n commented on Apr 27, 2026

    @231tr0n

    @chancez I think you have to :w<CR> once for it to repopulate the entries to quickfix list after entry deletion. After writing, it seems to work correctly. I feel this is an expected and right behaviour.

  2. idbrii commented on Jul 10, 2026

    @idbrii

    If you don't like having to :w after changing, you could try ~/.vim/after/ftplugin/qf.vim with

    nnoremap <buffer> <CR> :<C-u>w<CR><CR>
    

    That way it writes right before jumping to an entry. But that won't cover other bindings for :cnext etc. Instead, you could make it recompute on every delete:

    nnoremap <buffer> dd dd:<C-u>w<CR>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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