Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Simulating ZLE_RPROMPT_INDENT=0



On Dec 18,  9:27am, Peter Stephenson wrote:
} Subject: Re: Simulating ZLE_RPROMPT_INDENT=0
}
} On Tue, 17 Dec 2013 22:43:37 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > simply assume that if ZLE_RPROMPT_INDENT=0, then printing the cub1
} > sequence will do the right thing.  (An extra check could be that the
} > cub1 sequence is not backspace or del.)
} > 
} > To do this would require that rprompt_off be available in moveto(), which
} > likely means it needs to become global like vln and vcs.  It's rather
} > inefficient anyway to be looking up the value of ZLE_RPROMPT_INDENT every
} > time zrefresh() is called; it ought to be handled like LINES/COLUMNS.
} 
} That sounds reasonable.

OK, so various questions ...

Are we sticking with the name ZLE_RPROMPT_INDENT ?  None of the other
prompt-related variables have "ZLE_" stuck on the front of them, even
though a number of them are useless when zsh/zle is not loaded.

Is it OK to declare ZLE_RPROMPT_INDENT in params.c or should it go in a
Zle/*.c file?  zle_params.c is currently limited to parameters that are
pseudo-local to widget context so this would need special handling.

In the event that the terminal has no non-destructive move-left sequence,
should assigning ZLE_RPROMPT_INDENT=0 print a warning?  Should it also
(or instead) ignore the value and revert to 1 in that case?

I suppose it should also reset itself upon assignment to TERM.  This is
looking like a fairly large effort for a fairly tiny feature ...



Messages sorted by: Reverse Date, Date, Thread, Author