diff options
| author | Fasamii <fasami0512@gmail.com> | 2026-02-17 23:04:45 +0100 |
|---|---|---|
| committer | Fasamii <fasami0512@gmail.com> | 2026-02-17 23:04:45 +0100 |
| commit | 85c6d741d0aa27a4cc419b5af04e0f8b1bc881d5 (patch) | |
| tree | 889a37e2af78c328dde3f600c0f2e154b9a495ca /lua/netrw-icons/parse.lua | |
| parent | b72d585866564779e93bff98dcc5b389ae88653c (diff) | |
| download | netrw-icons.nvim-85c6d741d0aa27a4cc419b5af04e0f8b1bc881d5.tar.gz netrw-icons.nvim-85c6d741d0aa27a4cc419b5af04e0f8b1bc881d5.tar.bz2 netrw-icons.nvim-85c6d741d0aa27a4cc419b5af04e0f8b1bc881d5.tar.xz netrw-icons.nvim-85c6d741d0aa27a4cc419b5af04e0f8b1bc881d5.tar.zst | |
FIX: buitlin type override by node type
Diffstat (limited to 'lua/netrw-icons/parse.lua')
| -rw-r--r-- | lua/netrw-icons/parse.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lua/netrw-icons/parse.lua b/lua/netrw-icons/parse.lua index 4b5d121..cea193f 100644 --- a/lua/netrw-icons/parse.lua +++ b/lua/netrw-icons/parse.lua @@ -19,26 +19,26 @@ M.TYPE_SYMLINK = 3 ---@return rwNode|nil local parse_liststyle_0 = function(line) local node = {}; - node.type = M.TYPE_FILE; + node.node_type = M.TYPE_FILE; node.icon = 0; node.name = line; if node.name:sub(-1) == "*" then - node.type = M.TYPE_EXE; + node.node_type = M.TYPE_EXE; return node; end local _, _, link, link_target = string.find(line, "^(.+)@\t%s*%-%->%s*(.+)") if link then - node.type = M.TYPE_SYMLINK; + node.node_type = M.TYPE_SYMLINK; node.name = link_target; return node; end local _, _, dir = string.find(line, "^(.*)/") if dir then - node.type = M.TYPE_DIR; + node.node_type = M.TYPE_DIR; return node; end @@ -49,26 +49,26 @@ end ---@return rwNode|nil local parse_liststyle_1 = function(line) local node = {}; - node.type = M.TYPE_FILE; + node.node_type = M.TYPE_FILE; node.icon = 0; node.name = line:match("^(%S+)") if node.name:sub(-1) == "*" then - node.type = M.TYPE_EXE; + node.node_type = M.TYPE_EXE; return node; end local _, _, link, link_target = string.find(line, "^(.+)@%s+") if link then - node.type = M.TYPE_SYMLINK; + node.node_type = M.TYPE_SYMLINK; node.name = link_target; return node; end local _, _, dir = string.find(line, "^(.*)/") if dir then - node.type = M.TYPE_DIR; + node.node_type = M.TYPE_DIR; return node; end @@ -79,7 +79,7 @@ end ---@return rwNode|nil local parse_liststyle_3 = function(line) local node = {}; - node.type = M.TYPE_FILE; + node.node_type = M.TYPE_FILE; local _, tree_end = string.find(line, "^[|%s]*"); node.icon = tree_end; @@ -92,20 +92,20 @@ local parse_liststyle_3 = function(line) node.name = content; if node.name:sub(-1) == "*" then - node.type = M.TYPE_EXE; + node.node_type = M.TYPE_EXE; return node; end local _, _, link, link_target = string.find(content, "^(.+)@\t%s*%-%->%s*(.+)") if link then - node.type = M.TYPE_SYMLINK; + node.node_type = M.TYPE_SYMLINK; node.name = link_target; return node; end local _, _, dir = string.find(content, "^(.*)/") if dir then - type = M.TYPE_DIR; + node.node_type = M.TYPE_DIR; return node; end |
