Catch trailing whitespace when matching output
This commit is contained in:
parent
8a3e3e2794
commit
a763c6b53f
|
@ -17,7 +17,7 @@ endfunction
|
||||||
function! s:mq_output(buf, file)
|
function! s:mq_output(buf, file)
|
||||||
let buf=a:buf
|
let buf=a:buf
|
||||||
if !empty(a:buf)
|
if !empty(a:buf)
|
||||||
if a:buf is# 'no patches applied' ||
|
if a:buf is# 'no patches applied ' ||
|
||||||
\ a:buf =~# "unknown command 'qtop'"
|
\ a:buf =~# "unknown command 'qtop'"
|
||||||
let buf = ''
|
let buf = ''
|
||||||
elseif exists("b:mq") && b:mq isnot# buf
|
elseif exists("b:mq") && b:mq isnot# buf
|
||||||
|
|
|
@ -132,7 +132,7 @@ function! s:update_hg_branch(...)
|
||||||
else
|
else
|
||||||
" remove \n at the end of the command
|
" remove \n at the end of the command
|
||||||
let output=system(cmd)[0:-2]
|
let output=system(cmd)[0:-2]
|
||||||
if output is# 'no patches applied' ||
|
if output is# 'no patches applied ' ||
|
||||||
\ output =~# "unknown command 'qtop'"
|
\ output =~# "unknown command 'qtop'"
|
||||||
let b:mq=''
|
let b:mq=''
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue