diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-11-13 20:49:39 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-11-13 20:49:39 +0300 |
commit | 0673352e7e02f8c5d539197ed58ac2327a264ee6 (patch) | |
tree | 021acd4e2d305f95ef347e73d0a171edab329cd3 /powerlevel9k.zsh-theme | |
parent | 2e8f00342ab6818066ff4616d47b8b009083bceb (diff) | |
parent | 6d3899b6e39a4699bfe35038544ca366bcfdcade (diff) |
Merge branch 'master' into next
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index b35dafda..b4f993ec 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -711,18 +711,32 @@ $(print_icon 'MULTILINE_SECOND_PROMPT_PREFIX')" function zle-line-init { powerlevel9k_prepare_prompts + if (( ${+terminfo[smkx]} )); then + printf '%s' ${terminfo[smkx]} + fi + zle reset-prompt + zle -R +} + +function zle-line-finish { + powerlevel9k_prepare_prompts + if (( ${+terminfo[rmkx]} )); then + printf '%s' ${terminfo[rmkx]} + fi zle reset-prompt + zle -R } function zle-keymap-select { powerlevel9k_prepare_prompts zle reset-prompt + zle -R } powerlevel9k_init() { # Display a warning if the terminal does not support 256 colors local term_colors - term_colors=$(tput colors) + term_colors=$(echotc Co) if (( term_colors < 256 )); then print -P "%F{red}WARNING!%f Your terminal supports less than 256 colors!" print -P "You should put: %F{blue}export TERM=\"xterm-256color\"%f in your \~\/.zshrc" @@ -744,6 +758,7 @@ powerlevel9k_init() { add-zsh-hook precmd powerlevel9k_prepare_prompts zle -N zle-line-init + zle -N zle-line-finish zle -N zle-keymap-select } |