Commits

ZyX_I committed 4048c16

Made delfunctions s: prefix handling less error-prone

Comments (0)

Files changed (2)

plugin/frawor/functions.vim

     finish
 endif
 execute frawor#Setup('0.0', {}, 1)
+let s:g.sidfpref=substitute(s:Eval('expand("<sfile>")[9:-5]'), s:g._sid,'%u','')
 "▶1 delfunctions
 function s:F.delfunctions(plugdict)
     let d={}
         endif
         let fstr=string(d.Function)[10:-3]
         if fstr[:1]==#'s:'
-            let fstr='<SNR>'.a:plugdict.sid.'_'.fstr[2:]
+            let fstr=printf(s:g.sidfpref, a:plugdict.sid).fstr[2:]
         elseif string(+fstr)==#fstr
             continue
         endif

test/reload-frawor.ok

-load: plugin/frawor/functions
-load: plugin/frawor
-load: plugin/writefile-feature
-load: plugin/ignoredeps-feature
-unloadpre: plugin/frawor/functions
-unloadpre: plugin/ignoredeps-feature
-unloadpre: plugin/writefile-feature
-unloadpre: plugin/frawor
-unload: plugin/frawor/functions
-unload: plugin/ignoredeps-feature
-load: plugin/frawor
-load: plugin/writefile-feature
-load: plugin/ignoredeps-feature
-load: plugin/frawor/functions
 load: plugin/frawor/functions
 load: plugin/frawor
 load: plugin/writefile-feature