comparison plugin/lawrencium.vim @ 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
comparison
equal deleted inserted replaced
122:a9136d95cf47 123:860e6502b239
368 return l:hg_command 368 return l:hg_command
369 endfunction 369 endfunction
370 370
371 " Runs a Mercurial command in the repo. 371 " Runs a Mercurial command in the repo.
372 function! s:HgRepo.RunCommand(command, ...) abort 372 function! s:HgRepo.RunCommand(command, ...) abort
373 let l:prev_hgplain = $HGPLAIN
374 let $HGPLAIN = 'true'
373 let l:all_args = [a:command] + a:000 375 let l:all_args = [a:command] + a:000
374 let l:hg_command = call(self['GetCommand'], l:all_args, self) 376 let l:hg_command = call(self['GetCommand'], l:all_args, self)
375 call s:trace("Running Mercurial command: " . l:hg_command) 377 call s:trace("Running Mercurial command: " . l:hg_command)
376 return system(l:hg_command) 378 let l:cmd_out = system(l:hg_command)
379 let $HGPLAIN = l:prev_hgplain
380 return l:cmd_out
377 endfunction 381 endfunction
378 382
379 " Runs a Mercurial command in the repo and reads its output into the current 383 " Runs a Mercurial command in the repo and reads its output into the current
380 " buffer. 384 " buffer.
381 function! s:HgRepo.ReadCommandOutput(command, ...) abort 385 function! s:HgRepo.ReadCommandOutput(command, ...) abort