1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-22 07:11:58 +00:00

bug fix: add current background to the cache key in {right,left}_prompt_segment

This commit is contained in:
romkatv 2019-02-25 07:04:33 +01:00
parent 968e1a618c
commit 7611cfda98

View file

@ -159,7 +159,7 @@ p9k_cache_get() {
set_default last_left_element_index 1
set_default POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS " "
left_prompt_segment() {
local cache_key="${(q)0} ${(q)1} ${(q)2} ${(q)3} ${(q)4} ${(q)5:+1} ${(q)6}"
local cache_key="${(q)0} ${(q)1} ${(q)2} ${(q)3} ${(q)4} ${(q)5:+1} ${(q)6} ${(q)CURRENT_BG}"
local cached
if ! cached=$(p9k_cache_get $cache_key); then
@ -278,7 +278,7 @@ CURRENT_RIGHT_BG='NONE'
set_default last_right_element_index 1
set_default POWERLEVEL9K_WHITESPACE_BETWEEN_RIGHT_SEGMENTS " "
right_prompt_segment() {
local cache_key="${(q)0} ${(q)1} ${(q)2} ${(q)3} ${(q)4} ${(q)5:+1} ${(q)6}"
local cache_key="${(q)0} ${(q)1} ${(q)2} ${(q)3} ${(q)4} ${(q)5:+1} ${(q)6} ${(q)CURRENT_RIGHT_BG}"
local cached
if ! cached=$(p9k_cache_get $cache_key); then