* Revert "fix(#3172): live filter exception (#3173)" This reverts commit0a7fcdf3f8. * Revert "refactor(#2826): move view to instanced window class (#3153)" This reverts commit0a06f65bf0. * feat(#3157): add view.cursorlineopt
This commit is contained in:
committed by
GitHub
parent
9b289abd69
commit
a4699c0904
@@ -31,8 +31,6 @@ local Clipboard = Class:extend()
|
||||
---@protected
|
||||
---@param args ClipboardArgs
|
||||
function Clipboard:new(args)
|
||||
args.explorer:log_new("Clipboard")
|
||||
|
||||
self.explorer = args.explorer
|
||||
|
||||
self.data = {
|
||||
@@ -44,10 +42,6 @@ function Clipboard:new(args)
|
||||
self.reg = self.explorer.opts.actions.use_system_clipboard and "+" or "1"
|
||||
end
|
||||
|
||||
function Clipboard:destroy()
|
||||
self.explorer:log_destroy("Clipboard")
|
||||
end
|
||||
|
||||
---@param source string
|
||||
---@param destination string
|
||||
---@return boolean
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local core = require("nvim-tree.core")
|
||||
local utils = require("nvim-tree.utils")
|
||||
local events = require("nvim-tree.events")
|
||||
local view = require("nvim-tree.view")
|
||||
local lib = require("nvim-tree.lib")
|
||||
local notify = require("nvim-tree.notify")
|
||||
|
||||
@@ -13,12 +14,10 @@ local M = {
|
||||
|
||||
---@param windows integer[]
|
||||
local function close_windows(windows)
|
||||
local explorer = core.get_explorer()
|
||||
|
||||
-- Prevent from closing when the win count equals 1 or 2,
|
||||
-- where the win to remove could be the last opened.
|
||||
-- For details see #2503.
|
||||
if explorer and explorer.view.float.enable and #vim.api.nvim_list_wins() < 3 then
|
||||
if view.View.float.enable and #vim.api.nvim_list_wins() < 3 then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -31,17 +30,16 @@ end
|
||||
|
||||
---@param absolute_path string
|
||||
local function clear_buffer(absolute_path)
|
||||
local explorer = core.get_explorer()
|
||||
local bufs = vim.fn.getbufinfo({ bufloaded = 1, buflisted = 1 })
|
||||
for _, buf in pairs(bufs) do
|
||||
if buf.name == absolute_path then
|
||||
local tree_winnr = vim.api.nvim_get_current_win()
|
||||
if buf.hidden == 0 and (#bufs > 1 or explorer and explorer.view.float.enable) then
|
||||
if buf.hidden == 0 and (#bufs > 1 or view.View.float.enable) then
|
||||
vim.api.nvim_set_current_win(buf.windows[1])
|
||||
vim.cmd(":bn")
|
||||
end
|
||||
vim.api.nvim_buf_delete(buf.bufnr, { force = true })
|
||||
if explorer and not explorer.view.float.quit_on_focus_loss then
|
||||
if not view.View.float.quit_on_focus_loss then
|
||||
vim.api.nvim_set_current_win(tree_winnr)
|
||||
end
|
||||
if M.config.actions.remove_file.close_window then
|
||||
|
||||
Reference in New Issue
Block a user