summaryrefslogtreecommitdiff
path: root/_config
diff options
context:
space:
mode:
authorUEDA Naoaki <n.ueda@socialdog.jp>2024-08-02 00:32:27 +0900
committerUEDA Naoaki <n.ueda@socialdog.jp>2024-08-02 00:32:27 +0900
commit5efe651d789a6d40a40be9e4127ecfd8db684dae (patch)
tree41b5b40fd035bd3c46194272e96ec90c4e2b5a23 /_config
parent2d75d39b0bc8d4e285699c6184d1d5cdf9939d5e (diff)
downloadvimrc-5efe651d789a6d40a40be9e4127ecfd8db684dae.tar.gz
vimrc-5efe651d789a6d40a40be9e4127ecfd8db684dae.tar.bz2
vimrc-5efe651d789a6d40a40be9e4127ecfd8db684dae.zip
Fix lightline config
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('%')