Execute "sign place" with C lang
Fixes https://github.com/mhinz/vim-signify/issues/293
This commit is contained in:
parent
bdbda32568
commit
7afad33753
@ -88,12 +88,7 @@ endfunction
|
|||||||
|
|
||||||
" Function: s:get_lines {{{1
|
" Function: s:get_lines {{{1
|
||||||
function! s:get_lines() abort
|
function! s:get_lines() abort
|
||||||
let lang = v:lang
|
let signlist = sy#util#execute('sign place buffer='. b:sy.buffer)
|
||||||
language message C
|
|
||||||
redir => signlist
|
|
||||||
silent! execute 'sign place buffer='. b:sy.buffer
|
|
||||||
redir END
|
|
||||||
silent! execute 'language message' lang
|
|
||||||
|
|
||||||
let lines = []
|
let lines = []
|
||||||
for line in split(signlist, '\n')[2:]
|
for line in split(signlist, '\n')[2:]
|
||||||
|
@ -24,9 +24,7 @@ function! sy#sign#get_current_signs(sy) abort
|
|||||||
let a:sy.internal = {}
|
let a:sy.internal = {}
|
||||||
let a:sy.external = {}
|
let a:sy.external = {}
|
||||||
|
|
||||||
redir => signlist
|
let signlist = sy#util#execute('sign place buffer='. a:sy.buffer)
|
||||||
silent! execute 'sign place buffer='. a:sy.buffer
|
|
||||||
redir END
|
|
||||||
|
|
||||||
for signline in split(signlist, '\n')[2:]
|
for signline in split(signlist, '\n')[2:]
|
||||||
let tokens = matchlist(signline, '\v^\s+\S+\=(\d+)\s+\S+\=(\d+)\s+\S+\=(.*)$')
|
let tokens = matchlist(signline, '\v^\s+\S+\=(\d+)\s+\S+\=(\d+)\s+\S+\=(.*)$')
|
||||||
|
@ -97,3 +97,13 @@ function! sy#util#return_if_no_changes() abort
|
|||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Function: #execute {{{1
|
||||||
|
function! sy#util#execute(cmd) abort
|
||||||
|
let lang = v:lang
|
||||||
|
redir => output
|
||||||
|
silent! execute a:cmd
|
||||||
|
redir END
|
||||||
|
silent! execute 'language message' lang
|
||||||
|
return output
|
||||||
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user