From a26ca7bf56790f6bc35134a5037df0405437a1be Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 26 Mar 2024 15:24:12 +0100 Subject: [PATCH] fix(lazygit): dont error when setting ansi color fails. Fixes #2829 --- lua/lazyvim/util/lazygit.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/util/lazygit.lua b/lua/lazyvim/util/lazygit.lua index 9da4d674..6f4bf3c5 100644 --- a/lua/lazyvim/util/lazygit.lua +++ b/lua/lazyvim/util/lazygit.lua @@ -44,7 +44,8 @@ end function M.update_theme() -- LazyGit uses color 241 a lot, so also set it to a nice color - M.set_ansi_color(241, LazyVim.ui.color("Special") or "blue") + -- pcall, since some terminals don't like this + pcall(M.set_ansi_color, 241, LazyVim.ui.color("Special") or "blue") local theme = { activeBorderColor = { LazyVim.ui.color("MatchParen") or "orange", "bold" },