From d804048efc46b8b248693fa3a7bfc9f863bb1254 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Fri, 5 Jan 2024 05:27:33 +0100 Subject: [PATCH] fix a bug in DCS detection within instant prompt output (#2518) --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 3c784625..a8297bc2 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -6629,7 +6629,7 @@ function _p9k_clear_instant_prompt() { fi print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed] local unexpected=${${content//$'\e[?'<->'c'}//$'\e['<->' q'} - unexpected=${(S)unexpected//$'\eP'*[^$'\e']#($'\e\\')} + unexpected=${(S)unexpected//$'\eP'(|*[^$'\e'])($'\e\e')#$'\e\\'} unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')} # Visual Studio Code prints this garbage. unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'}