Bekaboo / dropbar.nvim

IDE-like breadcrumbs, out of the box
GNU General Public License v3.0
896 stars 17 forks source link

[Bug]: if current file is not in cwd directory will hang #111

Closed bstaint closed 7 months ago

bstaint commented 7 months ago

Description

Open neovim in path C:\aaaa, :e C:\bbb\testfile.md neovim will hang

nvim version

v0.10.0-dev-582d7f4

dropbar.nvim version

183587de8899a8a61edd974ade9c4df73e6b6a49

Operating system and version

Windows

Minimal config

local tmp = vim.env.TMPDIR
  or vim.env.TEMPDIR
  or vim.env.TMP
  or vim.env.TEMP
  or '/tmp'
local data = tmp ..  '/' .. (vim.env.NVIM_APPNAME or 'nvim')
local packages_root = data .. '/site'
local cloned_root = packages_root .. '/pack/packages/start'
local cloned_path = cloned_root .. '/dropbar.nvim'
local url = 'https://github.com/Bekaboo/dropbar.nvim.git'

vim.fn.mkdir(cloned_root, 'p')
vim.opt.pp:prepend(packages_root)
vim.opt.rtp:prepend(packages_root)

if not vim.loop.fs_stat(cloned_path) then
  vim.fn.system({ 'git', 'clone', url, cloned_path })
end

require('dropbar').setup()

Steps to reproduce

Open neovim in path C:\aaaa, :w C:\bbb\testfile.md neovim will hang

Expected behavior

...

Actual behavior

...

Additional information

dead loop in here https://github.com/Bekaboo/dropbar.nvim/blob/183587de8899a8a61edd974ade9c4df73e6b6a49/lua/dropbar/sources/path.lua#L99

Bekaboo commented 7 months ago

Hi thanks for reporting! Currently dropbar path source does not support Windows, see https://github.com/Bekaboo/dropbar.nvim/pull/42 and https://github.com/Bekaboo/dropbar.nvim/issues/89. Because I don't use Windows, I can do little thing to fix this -- PR welcome to fix the issue!

Bekaboo commented 7 months ago

Probably fixed by #111

bstaint commented 7 months ago

Tks