Error when running from terminal
chazy opened this issue · 11 comments
I get this error when compiling a standard program from a non-gui vim:
Error detected while processing function QuickfixsignsSet..56_PlaceSign..56_SetItemId..56_SignExistsAt..56_BufferSigns:
line 1:
E121: Undefined variable: signss
Error detected while processing function QuickfixsignsSet:
line 53:
E171: Missing :endif
Any ideas?
The output from the make command that gives the error is this:
[ARM-CC] orientd.c...
[ARM-ASM] crtbegin_dynamic.S...
[ARM-ASM] crtend.S...
[ARM-LD] orientd
Which version of quickfixsigns do you use? This problem sometimes occurred in earlier versions but it shouldn't happen with the current version from github.
I use the version from this commit: 1cc5371
The commit is from June 7th.
Thanks for getting back to me.
Thanks for your response. Now I just get:
Error detected while processing function QuickfixsignsSet..54_PlaceSign..54_SetItemId..54_SignExistsAt..54_BufferSigns:
line 4:
E121: Undefined variable: l:signss
It's interesting this error is caused by line 4. Which version of vim do you use? (See :version)
Maybe it would help to define the variable beforehand:
function! s:BufferSigns(bufnr) "{{{3
if a:bufnr == -1
return []
endif
let l:signss = ''
redir => l:signss
Could you please insert the line
let l:signss = ""
and check if it solves the problem but still fills the variable when there is an error during compilation?
Thanks.
that gives me:
Error detected while processing function QuickfixsignsSet..54_PlaceSign..54_SetItemId..54_SignExistsAt..54_BufferSigns:
line 6:
E158: Invalid buffer name:
Hi,
Thanks for trying. May I kindle ask you if you could replace s:BufferSigns with this one:
function! s:BufferSigns(bufnr) "{{{3
echom "DBG QFS: s:BufferSigns" a:bufnr bufnr(a:bufnr)
if bufnr(a:bufnr) == -1
return []
endif
let l:signss = ''
redir => l:signss
exec 'silent sign place buffer='. a:bufnr
redir END
if exists('l:signss')
let signs = split(l:signss, '\n')
if len(signs) > 2
call remove(signs, 0, 1)
endif
else
echohl WarningMsg
echom "DEBUG quickfixsigns: BufferSigns:" a:bufnr
echohl NONE
let signs = []
endif
return signs
endf
This will also print a debug message that can be reviewed via the :messages command.
The actual problem is in QuickfixsignsSet() though I suppose. I'd appreciate if you could also insert the following line:
function! QuickfixsignsSet(event, ...) "{{{3
echom "DBG QuickfixsignsSet" string(a:000)
I'd apprectiate if you could compile your file and then execute:
redir @+
silent messages
redir END
and the paste the relevant lines of the clipboard's contents here.
Thanks for your patience.
Hi.
Sorry about the delay.
It sems to behave nucer with the above function. Below is the debug output:
DBG QuickfixsignsSet [[], 'orientd.c'] DBG QuickfixsignsSet [[], 'orientd.c'] DBG QuickfixsignsSet [[], 'orientd.c'] DBG QuickfixsignsSet [[], 'orientd.c'] DBG QuickfixsignsSet [[], 'orientd.c'] DBG QuickfixsignsSet [[], 'orientd.c'] DBG QuickfixsignsSet [[], 'orientd.c'] DBG QFS: s:BufferSigns 0 -1 (1 of 2): [ARM-CC] orientd.c... DBG QuickfixsignsSet [[], 'orientd.c'] DBG QFS: s:BufferSigns 0 -1
Thanks.
Hi,
Does it work now or does the problem persist?
Regard
it works with the latest fix you sent. Thanks!