fix(git): git folder fixes and improvements (#1809)
* coding style
* outlined git.show_on_open_dirs behavior
* show some icon on opendir even if show_on_open_dir=false
and show all children's status on parent
* fixed renamed icon not showing
* sorted icons
* removed DU from deleted as file will show up in tree
* fixed update_git_status in reloaders not tested
* fixed Api.git.reload()
Tested update_git_status in reloaders.lua
* sort icon only if not git signcolumn
* fixed crashing when root dir isn't git dir
* made git.show_on_dirs doc more concise
* git_statuses -> git_status for consistency
* explorer/common.lua -> explorer/node.lua
* fixed #1784 conflict
* don't order icons
* Revert "don't order icons"
This reverts commit 23f6276ef7.
This commit is contained in:
@@ -2,7 +2,7 @@ local utils = require "nvim-tree.utils"
|
||||
local view = require "nvim-tree.view"
|
||||
local core = require "nvim-tree.core"
|
||||
local lib = require "nvim-tree.lib"
|
||||
local explorer_common = require "nvim-tree.explorer.common"
|
||||
local explorer_node = require "nvim-tree.explorer.node"
|
||||
|
||||
local M = {}
|
||||
|
||||
@@ -15,7 +15,7 @@ function M.fn(where, what)
|
||||
for line, node in pairs(nodes_by_line) do
|
||||
local valid = false
|
||||
if what == "git" then
|
||||
valid = explorer_common.shows_git_status(node)
|
||||
valid = explorer_node.get_git_status(node) ~= nil
|
||||
elseif what == "diag" then
|
||||
valid = node.diag_status ~= nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user