Mercurial > vim-lawrencium
comparison plugin/lawrencium.vim @ 86:685dfc4b5862
Fix `Hgstatus` incorrectly saying nothing has changed.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 23 Apr 2014 20:36:34 -0700 |
parents | b82babe7fdf8 |
children | e688b658ce5b |
comparison
equal
deleted
inserted
replaced
85:ac2c226f1bac | 86:685dfc4b5862 |
---|---|
871 let l:repo = s:hg_repo() | 871 let l:repo = s:hg_repo() |
872 let l:status_path = l:repo.GetLawrenciumPath('', 'status', '') | 872 let l:status_path = l:repo.GetLawrenciumPath('', 'status', '') |
873 | 873 |
874 " Open the Lawrencium buffer in a new split window of the right size. | 874 " Open the Lawrencium buffer in a new split window of the right size. |
875 execute "rightbelow split " . l:status_path | 875 execute "rightbelow split " . l:status_path |
876 if line('$') == 1 | 876 if (line('$') == 1 && getline(1) == '') |
877 " Buffer is empty, which means there are not changes... | 877 " Buffer is empty, which means there are not changes... |
878 " Quit and display a message. | 878 " Quit and display a message. |
879 " TODO: figure out why the first `echom` doesn't show when alone. | 879 " TODO: figure out why the first `echom` doesn't show when alone. |
880 bdelete | 880 bdelete |
881 echom "Nothing was modified." | 881 echom "Nothing was modified." |