Commits

ZyX_I  committed 058185e

@/fwc/compiler: Completely ignore any messages when doing completion (solves a bug with absent `messages' variable)

  • Participants
  • Parent commits fd76e1d

Comments (0)

Files changed (1)

File plugin/frawor/fwc/compiler.vim

             call self.call('@%@.p._f.warn('.pargs.')')
         endif
         call self.call('@%@.F.warn('.args.')')
+    elseif msgstatus is# 'throwignore' || self.type is# 'complete'
+        " Ignore and fail
     elseif msgstatus is# 'throw'
         if exists('pargs')
             call self.call('add(@$@pmessages, ['.pargs.'])')
         endif
         call self.call('add(@$@messages, ['.args.'])')
-    elseif msgstatus is# 'throwignore'
-        " Ignore and fail
     endif
     return self.fail()
 endfunction
 endfunction
 "▶1 addsavemsgs     :: &self
 function s:compiler.addsavemsgs()
-    if self.msgs.statuses is# ['return']
+    if self.msgs.statuses[-1] is# 'return' || self.type is# 'complete'
         call add(self.msgs.savevars, [0, 0])
         return self
     else
     if !a:0
         call remove(self.msgs.savevars, -1)
     endif
+    if self.type is# 'complete'
+        return self
+    endif
     return   self.if('len(@$@messages)>'.msglenstr)
                     \.call('remove(@$@messages, '.msglenstr.', -1)')
                 \.up().if('len(@$@pmessages)>'.pmsglenstr)