Skip to content

Commit 114fde0

Browse files
authored
Merge branch 'master' into expand-until-2
2 parents 641f125 + 10db694 commit 114fde0

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
strategy:
5050
matrix:
5151
nvim_version: [ stable, nightly ]
52-
luals_version: [ 3.13.9 ]
52+
luals_version: [ 3.15.0 ]
5353

5454
env:
5555
VIMRUNTIME: /home/runner/nvim-${{ matrix.nvim_version }}/share/nvim/runtime

lua/nvim-tree/actions/fs/remove-file.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,16 @@ local function remove_dir(cwd)
7171

7272
-- Type must come from fs_stat and not fs_scandir_next to maintain sshfs compatibility
7373
local stat = vim.loop.fs_stat(new_cwd)
74+
-- TODO remove once 0.12 is the minimum neovim version
75+
-- path incorrectly specified as an integer, fixed upstream for neovim 0.12 https://github.com/neovim/neovim/pull/33872
76+
---@diagnostic disable-next-line: param-type-mismatch
77+
local lstat = vim.loop.fs_lstat(new_cwd)
78+
7479
local type = stat and stat.type or nil
80+
-- Checks if file is a link file to ensure deletion of the symlink instead of the file it points to
81+
local ltype = lstat and lstat.type or nil
7582

76-
if type == "directory" then
83+
if type == "directory" and ltype ~= "link" then
7784
local success = remove_dir(new_cwd)
7885
if not success then
7986
return false

lua/nvim-tree/actions/node/open-file.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local lib = require("nvim-tree.lib")
33
local notify = require("nvim-tree.notify")
44
local utils = require("nvim-tree.utils")
55
local core = require("nvim-tree.core")
6+
local full_name = require("nvim-tree.renderer.components.full-name")
67

78
local M = {}
89

@@ -40,7 +41,12 @@ local function usable_win_ids()
4041
end
4142

4243
local win_config = vim.api.nvim_win_get_config(id)
43-
return id ~= tree_winid and win_config.focusable and not win_config.hide and not win_config.external or false
44+
return id ~= tree_winid
45+
and id ~= full_name.popup_win
46+
and win_config.focusable
47+
and not win_config.hide
48+
and not win_config.external
49+
or false
4450
end, win_ids)
4551
end
4652

0 commit comments

Comments
 (0)