1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-24 16:11:57 +00:00

bug fix (incorrect height in instant prompt); embed LF in the line overflow workaround

This commit is contained in:
romkatv 2019-11-05 14:08:46 +01:00
parent 8231995ed5
commit b1450284e9

View file

@ -3704,7 +3704,7 @@ _p9k_dump_instant_prompt() {
(( __p9k_ksh_arrays )) && >&$fd print -r -- ' unsetopt ksh_arrays' (( __p9k_ksh_arrays )) && >&$fd print -r -- ' unsetopt ksh_arrays'
(( __p9k_sh_glob )) && >&$fd print -r -- ' unsetopt sh_glob' (( __p9k_sh_glob )) && >&$fd print -r -- ' unsetopt sh_glob'
>&$fd print -r -- ' >&$fd print -r -- '
: ${__p9k_used_instant_prompt[1]//$lf/$((++height))} (( height += ${#${__p9k_used_instant_prompt[1]//[^$lf]}} ))
local _p9k_ret local _p9k_ret
function _p9k_prompt_length() { function _p9k_prompt_length() {
local COLUMNS=1024 local COLUMNS=1024
@ -5085,7 +5085,7 @@ _p9k_init_display() {
_p9k_init_prompt() { _p9k_init_prompt() {
_p9k_t=($'\n' '' '') _p9k_t=($'\n' '' '')
_p9k_prompt_overflow_bug && _p9k_t[2]='%{%G%}' _p9k_prompt_overflow_bug && _p9k_t[2]=$'%{%G\n%}'
_p9k_init_lines _p9k_init_lines