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

bqf preview window stuck when jumps are used #70

Closed
danielnehrig opened this issue Jun 7, 2022 · 10 comments
Closed

bqf preview window stuck when jumps are used #70

danielnehrig opened this issue Jun 7, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@danielnehrig
Copy link

Neovim version (nvim -v | head -n1)

any version

Operating system/version

macOs

How to reproduce the issue

  1. fill qf list
  2. go to qf window
  3. bqf shows the preview window popup for the file
  4. press ctrl+o to utilize jumplist

Expected behavior

jumping out of the qf window closes the bqf preview popup

Actual behavior

jumping out of the qf window with ctrl+o leaves the pop up open and overlays the buffer

@danielnehrig danielnehrig added the bug Something isn't working label Jun 7, 2022
@kevinhwang91
Copy link
Owner

Have you disabled bqf and tried built-in qf? This is built-in qf behavior.

@danielnehrig
Copy link
Author

im talkin about the buffer preview window if that wasn't clear

@kevinhwang91
Copy link
Owner

I can't reproduce it, please use a minimal config and more detailed steps, maybe I misunderstand what you are talking about.

@danielnehrig
Copy link
Author

minimal

-- File To reproduce issues with a minimal setup
vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvim/site]])
local package_root = "/tmp/nvim/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup({
    {
      "wbthomason/packer.nvim",
      {
        "nvim-telescope/telescope.nvim",
        requires = {
          "nvim-lua/plenary.nvim",
        },
      },
      { "kevinhwang91/nvim-bqf", ft = "qf" }, -- better quickfix
      {
        "nvim-treesitter/nvim-treesitter",
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  })
end
_G.load_config = function()
  require("telescope").setup()
  vim.wo.foldmethod = "expr"
  vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
  vim.wo.foldnestmax = 3
  vim.wo.foldminlines = 1

  vim.keymap.set({ "n" }, "<space>ff", ":Telescope find_files<CR>", {
    silent = true,
  })
  require("nvim-treesitter.configs").setup({
    ensure_installed = { "lua" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
    highlight = {
      enable = true,
    },
    indent = {
      enable = true,
    },
    autotag = {
      enable = true,
    },
  })
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system({
    "git",
    "clone",
    "--depth=1",
    "https://github.com/wbthomason/packer.nvim",
    install_path,
  })
end
load_plugins()
require("packer").sync()
vim.cmd(
  [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
)
screen1_recording_2022-06-15_18-57-15.mp4

@danielnehrig
Copy link
Author

I can't reproduce it, please use a minimal config and more detailed steps, maybe I misunderstand what you are talking about.

here is a video because the steps to reproduce are already as detailed as it gets don't know what else to say

@danielnehrig
Copy link
Author

long story short when you have 2 windows one is a normal buffer the other is a qf window and you're inside the qf window and then use the jumplist to jump back the qf window will be a buffer when that happens the bqf buffer preview popup should close but it stays open

@danielnehrig
Copy link
Author

for demonstration purposes i then in the video closed the QF window or rather the now buffer window since we jumped back in the jumplist history to show the full effect of the bug which makes vim unusable since nothing can be done to get rid of the preview pop up

@kevinhwang91
Copy link
Owner

Do you mean you want the preview window to be closed after qf buffer is hidden?

@kevinhwang91
Copy link
Owner

Fixed now.

@danielnehrig
Copy link
Author

can confirm solves the issue thanks for the fast fix and response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants