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

bug: abandoned floating window does not close #17

Closed
2 tasks done
bugsbugsbux opened this issue Jan 5, 2023 · 4 comments
Closed
2 tasks done

bug: abandoned floating window does not close #17

bugsbugsbux opened this issue Jan 5, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@bugsbugsbux
Copy link

Did you check the docs and existing issues?

  • I have read the docs
  • I have searched the existing issues

Neovim version (nvim -v)

0.8.2 build type: release

Operating system/version

archlinux, 6.1.2-arch1-1

Describe the bug

If you abandon a floating window created by oil it stays there.

Steps To Reproduce

  • :Oil
  • g?
  • <C-w>h
  • hit enter on a file -> it opens the file but the oil-help is still shown

or:

  • :lua require'oil'.open_float()
  • <C-w>h
  • oil still shown

Expected Behavior

close all oil created windows as soon as a non-oil-created window gains focus

Directory structure

No response

Repro

-- 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/oil.nvim",
        config = function()
            require"oil".setup() -- add any needed settings here
        end,
  },
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@bugsbugsbux bugsbugsbux added the bug Something isn't working label Jan 5, 2023
@stevearc
Copy link
Owner

stevearc commented Jan 5, 2023

Done!

@stevearc stevearc closed this as completed Jan 5, 2023
@bugsbugsbux
Copy link
Author

Nice, however, this does not cover the second test case I provided... An abandoned open_float() has the same problem

@bugsbugsbux
Copy link
Author

@stevearc please reopen

@stevearc
Copy link
Owner

stevearc commented Jan 6, 2023

Apologies, I was in a rush. Should be working as expected now

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