mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 17:40:05 +08:00
Merge pull request #2365 from svalaskevicius/fix-2354-disable-auto-change-dir
disable autochange dir - fix option
This commit is contained in:
commit
157523f791
@ -915,7 +915,6 @@ function! SpaceVim#begin() abort
|
|||||||
augroup END
|
augroup END
|
||||||
else
|
else
|
||||||
call SpaceVim#logger#info('Startup with argv: ' . string(s:status[1]) )
|
call SpaceVim#logger#info('Startup with argv: ' . string(s:status[1]) )
|
||||||
call SpaceVim#plugins#projectmanager#current_root()
|
|
||||||
endif
|
endif
|
||||||
call SpaceVim#default#options()
|
call SpaceVim#default#options()
|
||||||
call SpaceVim#default#layers()
|
call SpaceVim#default#layers()
|
||||||
|
@ -81,8 +81,13 @@ endfunction
|
|||||||
function! SpaceVim#plugins#projectmanager#current_root() abort
|
function! SpaceVim#plugins#projectmanager#current_root() abort
|
||||||
let rootdir = getbufvar('%', 'rootDir', '')
|
let rootdir = getbufvar('%', 'rootDir', '')
|
||||||
if empty(rootdir)
|
if empty(rootdir)
|
||||||
let rootdir = s:change_to_root_directory()
|
let rootdir = s:find_root_directory()
|
||||||
else
|
if empty(rootdir)
|
||||||
|
let rootdir = getcwd()
|
||||||
|
endif
|
||||||
|
call setbufvar('%', 'rootDir', rootdir)
|
||||||
|
endif
|
||||||
|
if !empty(rootdir)
|
||||||
call s:change_dir(rootdir)
|
call s:change_dir(rootdir)
|
||||||
call SpaceVim#plugins#projectmanager#RootchandgeCallback()
|
call SpaceVim#plugins#projectmanager#RootchandgeCallback()
|
||||||
endif
|
endif
|
||||||
@ -160,9 +165,7 @@ function! s:sort_dirs(dirs) abort
|
|||||||
else
|
else
|
||||||
let dir = fnamemodify(dir, ':p:h')
|
let dir = fnamemodify(dir, ':p:h')
|
||||||
endif
|
endif
|
||||||
call s:change_dir(dir)
|
return dir
|
||||||
call setbufvar('%', 'rootDir', getcwd())
|
|
||||||
return b:rootDir
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -170,12 +173,5 @@ function! s:compare(d1, d2) abort
|
|||||||
return len(split(a:d2, '/')) - len(split(a:d1, '/'))
|
return len(split(a:d2, '/')) - len(split(a:d1, '/'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:change_to_root_directory() abort
|
|
||||||
if !empty(s:find_root_directory())
|
|
||||||
call SpaceVim#plugins#projectmanager#RootchandgeCallback()
|
|
||||||
endif
|
|
||||||
return getbufvar('%', 'rootDir', '')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" vim:set et nowrap sw=2 cc=80:
|
" vim:set et nowrap sw=2 cc=80:
|
||||||
|
@ -41,6 +41,7 @@ The next release is v1.0.0.
|
|||||||
- Fix fullscreen key binding ([#2351](https://github.com/SpaceVim/SpaceVim/pull/2351))
|
- Fix fullscreen key binding ([#2351](https://github.com/SpaceVim/SpaceVim/pull/2351))
|
||||||
- Added missed syntax for detached FlyGrep ([#2353](https://github.com/SpaceVim/SpaceVim/pull/2353), [`08d0713`](https://github.com/SpaceVim/SpaceVim/commit/08d0713c4494ca401942a6ca10a48a1ac8484ce1))
|
- Added missed syntax for detached FlyGrep ([#2353](https://github.com/SpaceVim/SpaceVim/pull/2353), [`08d0713`](https://github.com/SpaceVim/SpaceVim/commit/08d0713c4494ca401942a6ca10a48a1ac8484ce1))
|
||||||
- Fix FlyGrep syntax to support different outputs ([#2363](https://github.com/SpaceVim/SpaceVim/pull/2363), [`0b26f40`](https://github.com/SpaceVim/SpaceVim/commit/0b26f407d879427505418f5c3b4c1d753f3f4317))
|
- Fix FlyGrep syntax to support different outputs ([#2363](https://github.com/SpaceVim/SpaceVim/pull/2363), [`0b26f40`](https://github.com/SpaceVim/SpaceVim/commit/0b26f407d879427505418f5c3b4c1d753f3f4317))
|
||||||
|
- Fix `project_rooter_automatically = 0` option to not change directory to project root ([#2363](https://github.com/SpaceVim/SpaceVim/pull/2365))
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user