From 7ccb2b06087663b12628470bbc7aa1207596a76a Mon Sep 17 00:00:00 2001 From: LightQuantum Date: Wed, 15 Feb 2023 03:51:56 +0800 Subject: [PATCH] utils: fix #129 * wrappers: fix missing variable * bufferline: fix type error if indicator is null --- plugins/bufferlines/bufferline.nix | 6 +++++- wrappers/_shared.nix | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/bufferlines/bufferline.nix b/plugins/bufferlines/bufferline.nix index e6268339..8b92e97a 100644 --- a/plugins/bufferlines/bufferline.nix +++ b/plugins/bufferlines/bufferline.nix @@ -263,7 +263,11 @@ in middle_mouse_command = cfg.middleMouseCommand; # deprecated, but might still work indicator_icon = cfg.indicatorIcon; - indicator = cfg.indicator; + indicator = + if cfg.indicator != null then with cfg.indicator; { + icon = icon; + style = style; + } else null; buffer_close_icon = cfg.bufferCloseIcon; modified_icon = cfg.modifiedIcon; close_icon = cfg.closeIcon; diff --git a/wrappers/_shared.nix b/wrappers/_shared.nix index 6ebe609f..43c5ae6c 100644 --- a/wrappers/_shared.nix +++ b/wrappers/_shared.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, pkgs, ... }: let inherit (lib) mkEnableOption mkOption mkOptionType mkForce mkMerge mkIf types;