Răsfoiți Sursa

Add `close` action.

This addresses issue #95, "How close BufExplorer is if it has opened in
another tab".  A running BufExplorer may be closed via:

```
:BufExplorer close
```
Michael Henry 9 luni în urmă
părinte
comite
7fbce9da97
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      plugin/bufexplorer.vim

+ 6 - 0
plugin/bufexplorer.vim

@@ -96,6 +96,7 @@ endif
 " Command actions {{{2
 let s:actions = [
         \ 'current',
+        \ 'close',
         \ ]
 
 " Command-line completion function for `s:actions`.
@@ -611,6 +612,11 @@ function! BufExplorer(...)
         return
     endif
 
+    if action == 'close'
+        call s:Close()
+        return
+    endif
+
     let [tabNbr, winNbr] = s:FindBufExplorer()
     if tabNbr > 0
         execute 'keepjumps ' . tabNbr . 'tabnext'