summaryrefslogtreecommitdiff
path: root/_config
diff options
context:
space:
mode:
Diffstat (limited to '_config')
-rw-r--r--_config/101-lightline.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/_config/101-lightline.vim b/_config/101-lightline.vim
index 4e8a8c3..d841238 100644
--- a/_config/101-lightline.vim
+++ b/_config/101-lightline.vim
@@ -39,9 +39,9 @@ function! LightlineLinterOK() abort
endfunction
function! LightlineFilename()
+ let root = fnamemodify(get(b:, 'git_dir'), ':h')
let path = expand('%:p')
- let root = trim(system('git rev-parse --show-toplevel 2>/dev/null'))
- if v:shell_error == 0 && path[:len(root)-1] ==# root
+ if path[:len(root)-1] ==# root
return path[len(root)+1:]
endif
return expand('%')