From 23244bb41087f4f833c33219bba7a7213710ab20 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 14 Jan 2016 01:09:16 +0900 Subject: [PATCH] [fish] Fix intermittent errors on CTRL-T This seems like a bug of fish, but sometimes when you select an item fish complains: "insertion mode switches can not be used when not in insertion mode" This only happens when using tmux pane. Injecting a dummy command somehow fixes the issue. --- shell/key-bindings.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index 3d3c2a7..40a1fee 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -20,6 +20,7 @@ function fzf_key_bindings -o -type d -print \ -o -type l -print 2> /dev/null | sed 1d | cut -b3-" eval "$FZF_CTRL_T_COMMAND | "(__fzfcmd)" -m > $TMPDIR/fzf.result" + and sleep 0 and commandline -i (cat $TMPDIR/fzf.result | __fzf_escape) commandline -f repaint rm -f $TMPDIR/fzf.result