From f798c2a1eb3147d50957d4dceae76f06a7a57bd0 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Thu, 4 Jan 2024 19:49:34 -0800 Subject: [PATCH] remove redundant if --- functions/fish_prompt.fish | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 3b58b7b..a9f0bdf 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -151,15 +151,13 @@ end" if test "$tide_prompt_transient_enabled" = true function _tide_enter_transient - # If the commandline will be executed, or is empty - if commandline --is-valid || test -z "$(commandline)" - # Pager open usually means selecting, not running - # Can be untrue, but it's better than the alternative - if not commandline --paging-mode - set -g _tide_transient - set -g _tide_repaint - commandline -f repaint - end + # If the commandline will be executed or is empty, and the pager is not open + # Pager open usually means selecting, not running + # Can be untrue, but it's better than the alternative + if commandline --is-valid || test -z "$(commandline)" && not commandline --paging-mode + set -g _tide_transient + set -g _tide_repaint + commandline -f repaint end commandline -f execute end