# HG changeset patch # User Ludovic Chabant # Date 1324423942 28800 # Node ID 0e952b7c79d7545894cb4614201d7a8162199681 # Parent 21a879a09f20a669fb6f41038ff3cf1aa7e76848 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. diff -r 21a879a09f20 -r 0e952b7c79d7 plugin/lawrencium.vim --- 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