From c02bf2548f6e4cc6283a6716006705c6353bd41d Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Mon, 15 Oct 2018 13:32:59 -0500 Subject: [PATCH] Close the completions pager (if it's open) on ctrl+c If you're using the old binding that only clears the commandline and doesn't preserve its contents and start a new line, you can use ```fish bind \cc "commandline -f cancel; commandline ''" ``` instead. Closes #4298. --- share/functions/__fish_cancel_commandline.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/functions/__fish_cancel_commandline.fish b/share/functions/__fish_cancel_commandline.fish index ee0c3d61f..f2708a637 100644 --- a/share/functions/__fish_cancel_commandline.fish +++ b/share/functions/__fish_cancel_commandline.fish @@ -1,5 +1,8 @@ # This is meant to be bound to something like \cC. function __fish_cancel_commandline + # Close the pager if it's open (#4298) + commandline -f cancel + set -l cmd (commandline) if test -n "$cmd" commandline -C 1000000