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

Bart's cleareod patch users/2973 (Was: zsh-3.1.6-dev-20)



Tanaka Akira <akr@xxxxxxxxxxx> typed:
:* zsh-users_2973 is not applied. (Because Geoff is not commented?)

Sorry, the message made it onto the disk and into the mailing list archive
but for some reason didn't get posted into my news system so I missed it.

Excerpts from Bart's message:
:I believe this has to do with the always_last_prompt option -- the code
:that prints the prompt wants to be sure that there's a clean slate below
:the prompt where it can display completion listings.  However, it's a
:bit too aggressive; it performs the clear-eod whenever it's "safe" to do
:so (that is, whenever there's no completion listing there already that
:needs to continue to be seen) and not just whenever it's necessary to do
:so (which it -almost- never is when always_last_prompt is not set).

Usually it's unnecessary.  However, most of the commands people run are
external to the shell and their output cannot be guaranteed to leave the
cursor in an appropriate position (i.e. below any output the external
command has generated).  Thus we clear a ``workspace'' and now we can
utilise an area we know is blank.  CLEAREOD is the quickest way.  Bart's
change makes it affect only the area we currently use.  The problem with
this (though maybe other people won't consider it a problem) is that it
does not leave any buffer space (e.g. an extra blank line) between zsh
output and any garbage that may be lying around on the screen.  Always
putting an extra blank line in will cause some extra/unnecessary scrolling
if we're at the bottom of the screen (and usually we can't reliably
determine where we are on the screen).  So the options are:
1) CLEAREOD                                (commonly: ``^[[J'')
2) CLEAREOL in our area                    (commonly: ``^[[K'' on each line) 
3) CLEAREOL in our area plus an extra line

Now there are parts of the screen refresh which are a bit aggressive, viz.
if we've done a CLEAREOD we still might do CLEAREOL further on - however
I haven't considered all the display permutations to determine whether it
is worth removing them yet.

Regards,
-- 
Geoff Wing : <gcw@xxxxxxxxx>     Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@xxxxxxxx>      Ego URL : http://pobox.com/~gcw/
Zsh Stuff  : <gcw@xxxxxxx>       Phone   : (Australia) 0413 431 874



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