changeset 69:8c9aca0e4322

Added return statement after calling s:error
author lmytinsk
date Wed, 25 Sep 2013 18:33:33 +0400
parents 7afcd4d37062
children 16e873b2a4a8
files plugin/lawrencium.vim
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/lawrencium.vim	Tue Mar 05 21:01:05 2013 -0800
+++ b/plugin/lawrencium.vim	Wed Sep 25 18:33:33 2013 +0400
@@ -881,6 +881,7 @@
     let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['!', '?'])
     if len(l:filenames) == 0
         call s:error("No files to add or remove in selection or current line.")
+        return
     endif
 
     " Run `addremove` on those paths.
@@ -896,6 +897,7 @@
     let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R'])
     if len(l:filenames) == 0
         call s:error("No files to commit in selection or file.")
+        return
     endif
 
     " Run `Hgcommit` on those paths.
@@ -924,6 +926,7 @@
     let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R'])
     if len(l:filenames) == 0
         call s:error("No files in selection or file to create patch.")
+        return
     endif
 
     " Run `Hg qnew` on those paths.
@@ -942,6 +945,7 @@
     let l:filenames = s:HgStatus_GetSelectedFiles(a:linestart, a:lineend, ['M', 'A', 'R'])
     if len(l:filenames) == 0
         call s:error("No files in selection or file to refresh the patch.")
+        return
     endif
 
     " Run `Hg qrefresh` on those paths.