From 9647e6a3022e298527a173508dd36cde24e2c18b Mon Sep 17 00:00:00 2001 From: Leonardo Date: Mon, 28 Aug 2023 13:20:48 -0300 Subject: [PATCH] feat: tint windows on startup (#46) Either when restoring a session or starting Neovim with -o, -O, or -p. Fixes #39. Co-authored-by: lbrayner --- lua/tint.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/tint.lua b/lua/tint.lua index 8a3273f..e4bfb1a 100644 --- a/lua/tint.lua +++ b/lua/tint.lua @@ -414,6 +414,16 @@ __.setup_all = function(skip_config) setup_namespaces() setup_autocmds() + + vim.schedule(function() + iterate_all_windows(function(winid, _) + if vim.api.nvim_get_current_win() ~= winid then + vim.api.nvim_win_call(winid, function() + __.on_unfocus() + end) + end + end) + end) end --- Setup user configuration, highlight namespaces, and autocommands