From e6ad48ea1b129471d279d45011b3e6de7fd3b62d Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 14 Apr 2016 18:28:32 +0200 Subject: Set fish_key_bindings globally in binding functions This should fix the tests. --- share/functions/fish_default_key_bindings.fish | 2 +- share/functions/fish_vi_key_bindings.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'share/functions') diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish index e679fac0..64f5115f 100644 --- a/share/functions/fish_default_key_bindings.fish +++ b/share/functions/fish_default_key_bindings.fish @@ -2,7 +2,7 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fish" -a mode if not set -q mode[1] if test "$fish_key_bindings" != "fish_default_key_bindings" - set fish_key_bindings fish_default_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed + set -g fish_key_bindings fish_default_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed return end # Clear earlier bindings, if any diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index 1956a11b..d46b7ccd 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -1,6 +1,6 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' if test "$fish_key_bindings" != "fish_vi_key_bindings" - set fish_key_bindings fish_vi_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed + set -g fish_key_bindings fish_vi_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed return end # The default escape timeout is 300ms. But for users of Vi bindings that can -- cgit v1.2.3