From 3f97ee170f87a040fb44071d1c7be24fc7d68c3a Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Sun, 24 Dec 2023 16:54:56 -0800 Subject: [PATCH] Use open pager as a heuristic for selecting/executing (closes #472) --- functions/fish_prompt.fish | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 0fa9f15a..3b58b7b4 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -153,9 +153,13 @@ 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)" - set -g _tide_transient - set -g _tide_repaint - commandline -f repaint + # 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 end commandline -f execute end