Closed capsey closed 2 months ago
when opening a buffer on a directory (e.g. using netrw), win.file_icon() returns an icon of a file instead of an icon of a directory
win.file_icon()
expected behaviour:
possible patch:
diff --git a/lua/tabby/feature/tabwins.lua b/lua/tabby/feature/tabwins.lua index c7e5f88..ae0ce00 100644 --- a/lua/tabby/feature/tabwins.lua +++ b/lua/tabby/feature/tabwins.lua @@ -125,6 +125,9 @@ function tabwins.new_win(winid, opt) return api.get_tab_current_win(api.get_win_tab(winid)) == winid end, file_icon = function() + if vim.fn.isdirectory(vim.api.nvim_buf_get_name(vim.api.nvim_win_get_buf(winid))) == 1 then + return '' + end -- require 'kyazdani42/nvim-web-devicons' local name = require('tabby.module.filename').tail(winid) local extension = vim.fn.fnamemodify(name, ':e')
Looks awesome, thank you!
when opening a buffer on a directory (e.g. using netrw),
win.file_icon()
returns an icon of a file instead of an icon of a directoryexpected behaviour:
possible patch: