Skip to content

Commit

Permalink
Init: Fix superfluous path separate at end
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ThomasFeher committed Jun 1, 2024
1 parent 800b705 commit 45fa2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/vim-bob.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 45fa2a8

Please sign in to comment.