summaryrefslogtreecommitdiffstats
path: root/vimrcs/statusline.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vimrcs/statusline.vim')
-rw-r--r--vimrcs/statusline.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vimrcs/statusline.vim b/vimrcs/statusline.vim
index 9216343..8105a31 100644
--- a/vimrcs/statusline.vim
+++ b/vimrcs/statusline.vim
@@ -68,7 +68,7 @@ function! ShowGit()
68 " 查看当前所在分支 68 " 查看当前所在分支
69 let s:branch = system(l:git . " branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/\\1/' | tr -d '\n' | tr -d ' '") 69 let s:branch = system(l:git . " branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/\\1/' | tr -d '\n' | tr -d ' '")
70 " 字符串匹配,匹配不到"HEAD detached at"或者”头指针在xxx分离“则返回branch 70 " 字符串匹配,匹配不到"HEAD detached at"或者”头指针在xxx分离“则返回branch
71 if match(s:branch, 'HEAD detached at') == -1 && match(s:branch, '分离') == -1 71 if match(s:branch, 'HEADdetachedat') == -1 && match(s:branch, '分离') == -1
72 return strlen(s:branch) ? 'b: '.s:branch.'> ' : '' 72 return strlen(s:branch) ? 'b: '.s:branch.'> ' : ''
73 endif 73 endif
74 " 查看当前是否在tag上,如果是则返回tag名 74 " 查看当前是否在tag上,如果是则返回tag名