Commits

ZyX_I committed 535e37e

Fixed filter and checker expressions

Comments (0)

Files changed (1)

plugin/frawor/functions.vim

             else
                 let d.carg=a:fopts[key]
             endif
-            let [id, a:fopts[key]]=call(s:F._frawor["add".key], [d.carg])
+            let [id, fdef[key.'str']]=call(s:F._frawor["add".key], [d.carg], {})
             let fdef[key]=id
         endif
     endfor
     endif
     "▶2 Process 'checker' and 'filter' keys
     if has_key(fdef, 'checker')
-        let func.=indent."if !".printf(fdef.checker, args)."\n".
+        let func.=indent."if !".printf(fdef.checkerstr, args)."\n".
                     \indent."    call s:F._frawor.throw('checkfailed', ".
                     \                                   fpref.".id, ".
                     \                                   fpref.".plid)\n".
                     \"endif\n"
+        unlet fdef.checkerstr
     endif
     if has_key(fdef, 'filter')
-        let func.=indent."let args=".printf(fdef.filter, args)."\n".
+        let func.=indent."let args=".printf(fdef.filterstr, args)."\n".
                     \indent."if type(args)!=".type([])."\n".
                     \indent."    call s:F._frawor.throw('filterfailed', ".
                     \                                   fpref.".id, ".
                     \                                   fpref.".plid)\n".
                     \indent."endif\n"
+        unlet fdef.filterstr
         let args="args"
     endif
     "▲2