mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
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.
This commit is contained in:
parent
6841de5e4b
commit
352cea1659
1 changed files with 4 additions and 0 deletions
|
@ -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.')
|
||||
|
|
Loading…
Reference in a new issue