1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-24 21:20:07 +00:00

fix a bug in DCS detection within instant prompt output (#2518)

This commit is contained in:
Roman Perepelitsa 2024-01-05 05:27:33 +01:00
parent cc6ed4be41
commit d804048efc

View file

@ -6629,7 +6629,7 @@ function _p9k_clear_instant_prompt() {
fi fi
print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed] print -rn -- $terminfo[rc]${(%):-%b%k%f%s%u}$terminfo[ed]
local unexpected=${${content//$'\e[?'<->'c'}//$'\e['<->' q'} 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\\')} unexpected=${(S)unexpected//$'\e'[^$'\a\e']#($'\a'|$'\e\\')}
# Visual Studio Code prints this garbage. # Visual Studio Code prints this garbage.
unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'} unexpected=${${unexpected//$'\033[1;32mShell integration activated\033[0m\n'}//$'\r'}