Add repository_status vim segment

Split segment highlighting compared to the file_vcs_status segment is
missing.

Refs #173.
This commit is contained in:
Kim Silkebækken 2013-02-06 08:59:53 +01:00
parent 5cc265affd
commit c8d4e58a93
1 changed files with 8 additions and 0 deletions

View File

@ -194,3 +194,11 @@ def file_vcs_status():
ret[0]['before'] = ' '
return ret
return None
@memoize(2)
def repository_status():
repo = guess(os.path.abspath(vim.current.buffer.name or os.getcwd()))
if repo:
return repo.status()
return None