#3 Crash at startup

closed
nobody
Module (7)
5
2010-02-20
2010-02-18
No

The code in autoload/viki.vim (94-102, see below) crashes at startup
when g:viki_intervikis is non-empty. The reason is that it calls
viki#Define which in turn calls viki#MakeName which isn't defined
at this point.

Solutions:
1) move the block to EOF
2) enclose the block in a function and call it at EOF
3) move viki#MakeName and viki#GetSimpleRx4SimpleWikiName before viki#Define

for [s:iname, s:idef] in items(g:viki_intervikis)
" viki#Define(name, prefix, ?suffix="*", ?index="Index.${suffix}")
if type(s:idef) == 1
call call('viki#Define', [s:iname, s:idef])
else
call call('viki#Define', [s:iname] + s:idef)
endif
unlet! s:iname s:idef
endfor

Discussion

  • Tom Link

    Tom Link - 2010-02-20
    • status: open --> closed
     
  • Tom Link

    Tom Link - 2010-02-20

    Thanks for reporting. Could you please try the current version from:
    http://www.vim.org/scripts/script.php?script_id=861

    Some functions were moved to autoload/viki.vim and back again.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks