diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-10-12 20:11:07 +0000 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-10-12 20:11:07 +0000 |
| commit | 4fcd7d42727e1020abc4543829db31d38db271a0 (patch) | |
| tree | 3d100a67596cc3ae026b8396f01eb8aee921299a /mut | |
| parent | 7ce90fce703694b1ccd08989d171b18eaba415b1 (diff) | |
fixup
Diffstat (limited to 'mut')
| -rw-r--r-- | mut/neovim/fnl/conf/init.fnl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mut/neovim/fnl/conf/init.fnl b/mut/neovim/fnl/conf/init.fnl index e3b56d5..3551c3a 100644 --- a/mut/neovim/fnl/conf/init.fnl +++ b/mut/neovim/fnl/conf/init.fnl @@ -79,8 +79,17 @@ (local lines (icollect [_ l (ipairs lines)] (if (not= l "") (prettify l)))) + (local is-at-last-line (let [[n lnum & rest] (vim.fn.getcurpos) + last-line (vim.api.nvim_buf_line_count 0)] + (do + (= lnum last-line)))) (vim.fn.setqflist [] :a {: id : title : lines}) - (vim.cmd ":cbottom")))) + (local is-qf? (= (vim.opt_local.buftype:get) "quickfix")) + (P [(not is-qf?) is-at-last-line]) + (if (or + (not is-qf?) + (and is-at-last-line is-qf?)) + (vim.cmd ":cbottom"))))) (var last_job nil) (local job |
