From 5efe651d789a6d40a40be9e4127ecfd8db684dae Mon Sep 17 00:00:00 2001 From: UEDA Naoaki Date: Fri, 2 Aug 2024 00:32:27 +0900 Subject: Fix lightline config --- _config/101-lightline.vim | 4 ++-- 1 file 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('%') -- cgit v1.2.3-54-g00ecf