Merge branch 'master' into expand-until-2
This commit is contained in:
commit
114fde0e07
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
nvim_version: [ stable, nightly ]
|
||||
luals_version: [ 3.13.9 ]
|
||||
luals_version: [ 3.15.0 ]
|
||||
|
||||
env:
|
||||
VIMRUNTIME: /home/runner/nvim-${{ matrix.nvim_version }}/share/nvim/runtime
|
||||
|
||||
@ -71,9 +71,16 @@ local function remove_dir(cwd)
|
||||
|
||||
-- Type must come from fs_stat and not fs_scandir_next to maintain sshfs compatibility
|
||||
local stat = vim.loop.fs_stat(new_cwd)
|
||||
local type = stat and stat.type or nil
|
||||
-- TODO remove once 0.12 is the minimum neovim version
|
||||
-- path incorrectly specified as an integer, fixed upstream for neovim 0.12 https://github.com/neovim/neovim/pull/33872
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
local lstat = vim.loop.fs_lstat(new_cwd)
|
||||
|
||||
if type == "directory" then
|
||||
local type = stat and stat.type or nil
|
||||
-- Checks if file is a link file to ensure deletion of the symlink instead of the file it points to
|
||||
local ltype = lstat and lstat.type or nil
|
||||
|
||||
if type == "directory" and ltype ~= "link" then
|
||||
local success = remove_dir(new_cwd)
|
||||
if not success then
|
||||
return false
|
||||
|
||||
@ -3,6 +3,7 @@ local lib = require("nvim-tree.lib")
|
||||
local notify = require("nvim-tree.notify")
|
||||
local utils = require("nvim-tree.utils")
|
||||
local core = require("nvim-tree.core")
|
||||
local full_name = require("nvim-tree.renderer.components.full-name")
|
||||
|
||||
local M = {}
|
||||
|
||||
@ -40,7 +41,12 @@ local function usable_win_ids()
|
||||
end
|
||||
|
||||
local win_config = vim.api.nvim_win_get_config(id)
|
||||
return id ~= tree_winid and win_config.focusable and not win_config.hide and not win_config.external or false
|
||||
return id ~= tree_winid
|
||||
and id ~= full_name.popup_win
|
||||
and win_config.focusable
|
||||
and not win_config.hide
|
||||
and not win_config.external
|
||||
or false
|
||||
end, win_ids)
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user