From 45fa2a8c77bf0200966623bc986d963de0bf23bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Feh=C3=A9r?= Date: Sat, 1 Jun 2024 18:21:57 +0200 Subject: [PATCH] Init: Fix superfluous path separate at end When no path is provided, then the resulting path has no path separator at the end. When a path is provided, the old behaviour was that the resulting path had a separator at the end. That is not only inconsistent it also broke the autocommands to open files in the dist folder as readonly. --- plugin/vim-bob.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vim-bob.vim b/plugin/vim-bob.vim index 4bfad90..078745c 100644 --- a/plugin/vim-bob.vim +++ b/plugin/vim-bob.vim @@ -48,7 +48,7 @@ function! s:EscapeForMakeprg(text) endfunction function! s:Init(path) - let l:bob_base_path = empty(a:path) ? getcwd() : fnamemodify(a:path, ':p') + let l:bob_base_path = empty(a:path) ? getcwd() : fnamemodify(a:path, ':p:h') " not using `--directory` but `cd` instead, because when running inside of " a container via `g:bob_prefix` we would pass the path on the host to Bob " running in the container, where the path is very likely different