From 9c413b039d572963dd5cf9a673ec47927d584df2 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 20 Apr 2021 15:29:28 +0200 Subject: [PATCH] Also fix tokenizer_state in bracketed paste path Also removes our remaining use of `__fish_commandline_is_singlequoted`. See #7782. --- share/functions/__fish_commandline_is_singlequoted.fish | 2 +- share/functions/__fish_shared_key_bindings.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_commandline_is_singlequoted.fish b/share/functions/__fish_commandline_is_singlequoted.fish index 7a3a81a29..2c421358e 100644 --- a/share/functions/__fish_commandline_is_singlequoted.fish +++ b/share/functions/__fish_commandline_is_singlequoted.fish @@ -1,5 +1,5 @@ # TODO: This function is deprecated. It was used in fish_clipboard_paste # which some users copied, so maybe leave it around for a few years. function __fish_commandline_is_singlequoted --description "Return 0 if the current token has an open single-quote" - string match -q 'single*' (__fish_tokenizer_state -- (commandline -ct)) + string match -q 'single*' (__fish_tokenizer_state -- (commandline -ct | string collect)) end diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index a57fd053f..93ae2e8bf 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -182,7 +182,7 @@ function __fish_start_bracketed_paste set -g __fish_last_bind_mode $fish_bind_mode # If the token is currently single-quoted, # we escape single-quotes (and backslashes). - __fish_commandline_is_singlequoted + string match -q 'single*' (__fish_tokenizer_state -- (commandline -ct | string collect)) and set -g __fish_paste_quoted 1 end