about summary refs log tree commit diff
path: root/fnl/nvrc/utils.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/nvrc/utils.fnl')
-rw-r--r--fnl/nvrc/utils.fnl16
1 files changed, 1 insertions, 15 deletions
diff --git a/fnl/nvrc/utils.fnl b/fnl/nvrc/utils.fnl
index a033009..04398b4 100644
--- a/fnl/nvrc/utils.fnl
+++ b/fnl/nvrc/utils.fnl
@@ -32,18 +32,4 @@
 (fn merge [...]
   (merge! {} ...))
 
-(fn del_buf []
-  (let [buflisted (vim.fn.getbufinfo {:buflisted 1})
-        (cur-winnr cur-bufnr) (values (vim.fn.winnr) (vim.fn.bufnr))]
-    (when (< (length buflisted) 2)
-      (vim.cmd "confirm qall")
-      (lua "return "))
-    (each [_ winid (ipairs (. (. (vim.fn.getbufinfo cur-bufnr) 1) :windows))]
-      (vim.cmd (string.format "%d wincmd w" (vim.fn.win_id2win winid)))
-      (vim.cmd (or (and (= cur-bufnr (. (. buflisted (length buflisted)) :bufnr))
-                    :bp) :bn)))
-    (vim.cmd (string.format "%d wincmd w" cur-winnr))
-    (local is-terminal (= (vim.fn.getbufvar cur-bufnr :&buftype) :terminal))
-    (vim.cmd (or (and is-terminal "bd! #") "silent! confirm bd #"))))
-
-{: merge : del_buf}
+{: merge}