Merge pull request #1188 from ZyX-I/zsh-ZLE_PROMPT_INDENT
Support ZLE_RPROMPT_INDENT
This commit is contained in:
commit
ef0e5039a1
|
@ -142,10 +142,14 @@ class Prompt(object):
|
|||
}
|
||||
zsh.setvalue('_POWERLINE_PARSER_STATE', None)
|
||||
zsh.setvalue('_POWERLINE_SHORTENED_PATH', None)
|
||||
try:
|
||||
zle_rprompt_indent = zsh.getvalue('ZLE_RPROMPT_INDENT')
|
||||
except IndexError:
|
||||
zle_rprompt_indent = 1
|
||||
r = ''
|
||||
if self.above:
|
||||
for line in self.powerline.render_above_lines(
|
||||
width=zsh.columns() - 1,
|
||||
width=zsh.columns() - zle_rprompt_indent,
|
||||
segment_info=segment_info,
|
||||
):
|
||||
r += line + '\n'
|
||||
|
|
|
@ -144,7 +144,7 @@ _powerline_setup_prompt() {
|
|||
new_args_2+=' --renderer_arg="local_theme=continuation"'
|
||||
local add_args_3=$add_args' --renderer_arg="local_theme=select"'
|
||||
local add_args_2=$add_args$new_args_2
|
||||
add_args+=' --width=$(( ${COLUMNS:-$(_powerline_columns_fallback)} - 1 ))'
|
||||
add_args+=' --width=$(( ${COLUMNS:-$(_powerline_columns_fallback)} - ${ZLE_RPROMPT_INDENT:-1} ))'
|
||||
local add_args_r2=$add_args$new_args_2
|
||||
PS1='$($=POWERLINE_COMMAND shell aboveleft '$add_args')'
|
||||
RPS1='$($=POWERLINE_COMMAND shell right '$add_args')'
|
||||
|
|
Loading…
Reference in New Issue