Browse Source

Some cleanup

Igor Prusov 7 years ago
parent
commit
b973549988
1 changed files with 6 additions and 10 deletions
  1. 6 10
      plugin/bufexplorer.vim

+ 6 - 10
plugin/bufexplorer.vim

@@ -965,18 +965,14 @@ function! s:RemoveBuffer(mode)
 
     let _bufNbr = str2nr(getline('.'))
 
-    if getbufvar(_bufNbr, '&modified') == 1
-
-        if a:mode != "force_delete"
-	    call s:Error("Sorry, no write since last change for buffer "._bufNbr.", unable to delete")
-	    return
-	endif
-        call s:DeleteBuffer(_bufNbr, a:mode)
-    else
-        " Okay, everything is good, delete or wipe the buffer.
-        call s:DeleteBuffer(_bufNbr, a:mode)
+    if getbufvar(_bufNbr, '&modified') == 1 && a:mode != "force_delete"
+	call s:Error("Sorry, no write since last change for buffer "._bufNbr.", unable to delete")
+	return
     endif
 
+    " Okay, everything is good, delete or wipe the buffer.
+    call s:DeleteBuffer(_bufNbr, a:mode)
+
     " Reactivate winmanager autocommand activity.
     if exists("b:displayMode") && b:displayMode == "winmanager"
         call WinManagerForceReSize("BufExplorer")