Mercurial > vim-lawrencium
diff plugin/lawrencium.vim @ 25:0e952b7c79d7
Fixed a bug with opening a diff from `Hgstatus`
When the previous window from the `Hgstatus` window was not a Lawrencium tracked window, the command would fail, or could even use the wrong repo.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 20 Dec 2011 15:32:22 -0800 |
parents | 21a879a09f20 |
children | de588a4bca10 |
line wrap: on
line diff
--- a/plugin/lawrencium.vim Tue Dec 20 15:25:51 2011 -0800 +++ b/plugin/lawrencium.vim Tue Dec 20 15:32:22 2011 -0800 @@ -422,12 +422,9 @@ endfunction function! s:HgStatus_FileDiff(vertical) abort - " Get the path of the file the cursor is on. - let l:filename = s:HgStatus_GetSelectedPath() - - " Go back to the previous window and call HgDiff. - wincmd p - call s:HgDiff(l:filename, a:vertical) + " Open the file and run `Hgdiff` on it. + call s:HgStatus_FileEdit() + call s:HgDiff('%:p', a:vertical) endfunction function! s:HgStatus_GetSelectedPath() abort