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

Various vared problems with screen refresh, etc.

I'm encountering all the problems I'm about to describe while using PWS's
"zse" (zstyle edit) function.  Stripped down, it looks like:

zse() {
  emulate -L zsh
  local styles="$(zstyle -L)"
  vared styles && eval $styles

Use it with a small enough window that all the styles won't fit on one
screen, so you have to scroll up and down.  In fact it's probably best
if they require more than -two- screens, but I'm not sure.

First problem:  Display refresh when a "minibuffer" command is used.
Make sure the cursor is at the last line (do end-of-buffer-or-history).
Invoke history-incremental-search-backward or -forward and look closely
at the display.  In my case, I'm seeing some lines that should be off
the top of the screen appearing above the `bck-i-search:' prompt.  I
think a refresh computation somewhere is counting down N lines from the
first line in the whole buffer, rather than down N lines from the first
visible line.

Second problem:  Even though history is not supposed to be available
(no -h argument to vared), history-incremental-search-backward is able
to run off into the history if it doesn't find the search string in the
current buffer.  This is a bit inconvenient as the only way to get back
to the original contents is to history-incremental-search-forward for a
string that appears there.

Third problem:  After finding the desired word with incremental search,
forward-char or backward-char can be used (this is not the problem yet)
to break out of the search and move around.  However, the cursor doesn't
begin responding immediately -- in fact, it freezes until you stop typing
for a while, and then suddenly jumps.  Thereafter it behaves normally
again.  This seems to be a problem with 4.1.x-dev that is NOT a problem
with 4.0.1 (haven't tried it in 4.0.2), and it's also not restricted to
vared.  Input gets "sticky" and refresh gets "jumpy" when scrolling up
and down in the normal history, too, almost any time a line longer than
$COLUMNS scrolls past.  This is especially annoying because several whole
history lines may flash by unseen when the refresh finally "jumps" (I've
"missed" as many as a dozen that way).

That last one has me quite baffled; I don't see any differences between
the 4.0.1 and 4.1.0-dev sources that would explain it; I'm not using a
shell function instead of a builtin widget anywhere; both binaries were
compiled with the same debugging options.  Anyone have any ideas?

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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