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: If deleting a file that you are working on and proceed to delete additional ones, you can delete your entire working directory. #1472

Open
3 tasks done
askachko opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@askachko
Copy link

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

0.9.5

Operating System / Version

MacOS 13.6.6

Describe the Bug

I ran into the same issue as this thread suggested: #1174

I did not know what the issue was until I re-read the thread, and decided to reproduce the issue.
It did exactly what the developer in the thread mentioned and I even updated to the latest version.

This issue has caused me to delete my entire working directory twice.

This is my first time reporting a bug, if you need more context or information let me know.

Screenshots, Traceback

No response

Steps to Reproduce

  1. have at least two files on the current directory, with one of them already open
  2. open neotree with reveal = true
  3. select the file which is open and delete it
  4. you will notice that the file is no longer opened, and there's an extra neotree pane on the background
  5. delete another file on the active neotree window
  6. see your whole working dir getting wiped out...

Expected Behavior

delete the multiple files without opening up a second instance of the file tree.

Your Configuration

// init.lua

local lazypath = vim.fn.stdpath("data") .. "/lazy/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",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end

vim.opt.rtp:prepend(lazypath)

require("vim-options")
require("lazy").setup({ { import = "plugins" } })

// neo-tree.lua
return {
  "nvim-neo-tree/neo-tree.nvim",
  branch = "v3.x",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
    "MunifTanjim/nui.nvim",
    -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
  },
  config = function()

			vim.keymap.set("n", "<leader>e", ":Neotree filesystem reveal float<CR>", {})
  end
}
@askachko askachko added the bug Something isn't working label May 16, 2024
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

1 participant