Commits

ZyX_I  committed 8f6bfb8

@aurum/diff: Added some throws. Ref #12

  • Participants
  • Parent commits 82c51f3

Comments (0)

Files changed (1)

File plugin/aurum/diff.vim

 elseif s:_pluginloaded
     finish
 endif
+let s:_messages={
+            \'nodfile': 'Failed to get file whose section is under the cursor',
+        \}
 "▶1 difffunc
 function s:difffunc.function(opts, ...)
     if a:0 && a:opts.repo is# ':'
     elseif a:action is# 'open'
         let file=s:_r.cmdutils.getdifffile(bvar)
         if file is 0
-            return ''
+            call s:_f.throw('nodfile')
         endif
         let fullpath=s:_r.os.path.join(bvar.repo.path, file)
         if empty(bvar.rev1)