1. ZyX_I
  2. frawor

Commits

ZyX_I  committed 4048c16

Made delfunctions s: prefix handling less error-prone

  • Participants
  • Parent commits 49b3f45
  • Branches default

Comments (0)

Files changed (2)

File plugin/frawor/functions.vim

View file
     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

File test/reload-frawor.ok

View file
-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