diff options
author | max397574 <[email protected]> | 2022-01-31 22:07:41 +0100 |
---|---|---|
committer | max397574 <[email protected]> | 2022-01-31 22:07:41 +0100 |
commit | 135f766246d8fc3d96620b1dd8c69f3ca4fd7f30 (patch) | |
tree | a6477bcf3cf8710ed88042a70c7640d94b9b3039 /lua/startup | |
parent | 36c3b0451b682ff965baeab463bc37af46b10d4f (diff) |
fix(init): don't display if in qf or help
Diffstat (limited to 'lua/startup')
-rw-r--r-- | lua/startup/init.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lua/startup/init.lua b/lua/startup/init.lua index 65a3996..ae49d4e 100644 --- a/lua/startup/init.lua +++ b/lua/startup/init.lua @@ -345,6 +345,9 @@ function startup.display(force) if startup_nvim_displayed then return end + if vim.tbl_contains({ "quickfix", "help" }, vim.bo.buftype) then + return + end if not force then if vim.fn.bufname() ~= "" then return @@ -519,7 +522,7 @@ function startup.display(force) 2, 2, }) - startup.redraw(false) + -- startup.redraw(false) startup.buffer_nr = vim.api.nvim_get_current_buf() end, 1) end @@ -567,6 +570,10 @@ function startup.redraw(other_file) temp_cursor = vim.api.nvim_win_get_cursor(temp_id) vim.fn.win_gotoid(startup.window_id) cursor = vim.api.nvim_win_get_cursor(startup.window_id) + else + if vim.fn.bufname() == "" then + return + end end startup.formatted_text = {} for _, line in ipairs(startup.lines) do |