Mercurial > vim-lawrencium
changeset 123:860e6502b239
Use HGPLAIN to ensure command outputs are clean.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 16 Feb 2016 21:53:42 -0800 |
parents | a9136d95cf47 |
children | d5602a22bab5 |
files | plugin/lawrencium.vim |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugin/lawrencium.vim Tue Oct 06 23:13:43 2015 -0700 +++ b/plugin/lawrencium.vim Tue Feb 16 21:53:42 2016 -0800 @@ -370,10 +370,14 @@ " Runs a Mercurial command in the repo. function! s:HgRepo.RunCommand(command, ...) abort + let l:prev_hgplain = $HGPLAIN + let $HGPLAIN = 'true' let l:all_args = [a:command] + a:000 let l:hg_command = call(self['GetCommand'], l:all_args, self) call s:trace("Running Mercurial command: " . l:hg_command) - return system(l:hg_command) + let l:cmd_out = system(l:hg_command) + let $HGPLAIN = l:prev_hgplain + return l:cmd_out endfunction " Runs a Mercurial command in the repo and reads its output into the current