From 352cea1659e2bc27f24f7bd9cb2cb1b28df6f089 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Mon, 5 Jun 2017 11:32:06 -0700 Subject: [PATCH] disable/enable bracketed paste by edit cmd buf We need to disable/enable bracketed paste mode around running the editor from within the `edit_command_buffer` function. --- share/functions/edit_command_buffer.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/functions/edit_command_buffer.fish b/share/functions/edit_command_buffer.fish index c46f11e20..4fabb5e24 100644 --- a/share/functions/edit_command_buffer.fish +++ b/share/functions/edit_command_buffer.fish @@ -17,9 +17,13 @@ function edit_command_buffer --description 'Edit the command buffer in an extern # Edit the command line with the users preferred editor or vim or emacs. commandline -b >$f if set -q VISUAL + __fish_disable_bracketed_paste eval $VISUAL $f + __fish_enable_bracketed_paste else if set -q EDITOR + __fish_disable_bracketed_paste eval $EDITOR $f + __fish_enable_bracketed_paste else echo echo (_ 'External editor requested but $VISUAL or $EDITOR not set.')