mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-30 00:34:42 +00:00
optimize _p9k_g_expand a little
This commit is contained in:
@@ -58,7 +58,10 @@ function _p9k_prompt_length() {
|
|||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
local -i x y=$#1 m
|
local -i x y=$#1 m
|
||||||
if (( y )); then
|
if (( y )); then
|
||||||
while (( ${${(%):-$1%$y(l.1.0)}[-1]} )); do (( y *= 2 )); done
|
while (( ${${(%):-$1%$y(l.1.0)}[-1]} )); do
|
||||||
|
x=y
|
||||||
|
(( y *= 2 ));
|
||||||
|
done
|
||||||
local xy
|
local xy
|
||||||
while (( y > x + 1 )); do
|
while (( y > x + 1 )); do
|
||||||
m=$(( x + (y - x) / 2 ))
|
m=$(( x + (y - x) / 2 ))
|
||||||
|
|||||||
Reference in New Issue
Block a user