zsh-workers
 help / color / mirror / code / Atom feed
* Zle display bug with LONG expansions
@ 1996-07-11 17:00 Bart Schaefer
  1996-07-11 18:32 ` Zoltan Hidvegi
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 1996-07-11 17:00 UTC (permalink / raw)
  To: zsh-workers

In an 80x32 (or smaller?) xterm, do the following:

zagzig[38] echo **/*<TAB>

You get something like this:

zagzig[38] >....
hashtable.h.orig Src/hashtable.o Src/hashtable.pro Src/hist.c Src/hist.c.orig Sr
c/hist.o Src/hist.pro Src/init.c Src/init.c.orig Src/init.o Src/init.pro Src/inp
ut.c Src/input.c.orig Src/input.o Src/input.pro Src/jobs.c Src/jobs.o Src/jobs.p
ro Src/lex.c Src/lex.c.orig Src/lex.o Src/lex.pro Src/linklist.c Src/linklist.o
Src/linklist.pro Src/loop.c Src/loop.o Src/loop.pro Src/makepro.sed Src/math.c S
rc/math.o Src/math.pro Src/mem.c Src/mem.o Src/mem.pro Src/params.c Src/params.c
.orig Src/params.o Src/params.pro Src/parse.c Src/parse.c.orig Src/parse.o Src/p
arse.pro Src/prototypes.h Src/prototypes.h.orig Src/signals.c Src/signals.h Src/
signals.o Src/signals.pro Src/signames.awk Src/signames.h Src/subst.c Src/subst.
o Src/subst.pro Src/system.h Src/tags Src/text.c Src/text.o Src/text.pro Src/uti
ls.c Src/utils.c.orig Src/utils.o Src/utils.pro Src/version.h Src/watch.c Src/wa
tch.o Src/watch.pro Src/zle.h Src/zle_bindings.c Src/zle_bindings.o Src/zle_bind
ings.pro Src/zle_hist.c Src/zle_hist.o Src/zle_hist.pro Src/zle_main.c Src/zle_m
ain.c.orig Src/zle_main.o Src/zle_main.pro Src/zle_misc.c Src/zle_misc.o Src/zle
_misc.pro Src/zle_move.c Src/zle_move.o Src/zle_move.pro Src/zle_refresh.c Src/z
le_refresh.o Src/zle_refresh.pro Src/zle_tricky.c Src/zle_tricky.c.0 Src/zle_tri
cky.c.1 Src/zle_tricky.c.orig Src/zle_tricky.o Src/zle_tricky.pro Src/zle_utils.
c Src/zle_utils.o Src/zle_utils.pro Src/zle_vi.c Src/zle_vi.o Src/zle_vi.pro Src
/zle_word.c Src/zle_word.o Src/zle_word.pro Src/zsh Src/zsh.h Src/zsh.h.orig Src
/ztype.h StartupFiles StartupFiles/Makefile StartupFiles/Makefile.in StartupFile
s/zlogin StartupFiles/zshenv StartupFiles/zshrc Util Util/Makefile Util/Makefile
.in Util/helpfiles Util/reporter Util/zsh-development-guide acconfig.h aclocal.m
4 config.cache config.guess config.h config.h.in config.log config.status config
.sub configure configure.in install-sh mkinstalldirs stamp-h stamp-h.in

Note that this uses only 25 of the available 32 lines.  Now type Ctrl-A to
go to the beginning of the expansion; you get:

intro.ms Doc/zsh.1 Doc/zsh.info Doc/zsh.info-1 Doc/zsh.info-2 Doc/zsh.info-3 Doc
/zsh.info-4 Doc/zsh.info-5 Doc/zsh.info-6 Doc/zsh.info-7 Doc/zsh.man Doc/zsh.tex
i Doc/zsh.texi.orig Doc/zshall.1 Doc/zshall.man Doc/zshbuiltins.1 Doc/zshbuiltin
s.man Doc/zshcompctl.1 Doc/zshcompctl.man Doc/zshexpn.1 Doc/zshexpn.man Doc/zshm
isc.1 Doc/zshmisc.man Doc/zshmisc.man.orig Doc/zshoptions.1 Doc/zshoptions.man D
oc/zshparam.1 Doc/zshparam.man Doc/zshzle.1 Doc/zshzle.man Etc Etc/BUGS Etc/CONT
RIBUTORS Etc/FAQ Etc/FEATURES Etc/MACHINES Etc/Makefile Etc/Makefile.in Etc/NEWS
 Functions Functions/Makefile Functions/Makefile.in Functions/acx Functions/cdma
tch Functions/cdmatch2 Functions/cx Functions/harden Functions/mere Functions/mu
lticomp Functions/proto Functions/randline Functions/run-help Functions/yp Funct
ions/yu Functions/zed INSTALL META-FAQ Makefile Makefile.in Misc Misc/Makefile M
isc/Makefile.in Misc/c2z Misc/compctl-examples Misc/lete2ctl README Src Src/Make
file Src/Makefile.in Src/TAGS Src/ansi2knr.c Src/builtin.c Src/builtin.o Src/bui
ltin.pro Src/compat.c Src/compat.o Src/compat.pro Src/cond.c Src/cond.o Src/cond
.pro Src/exec.c Src/exec.c.orig Src/exec.o Src/exec.pro Src/glob.c Src/glob.o Sr
c/glob.pro Src/globals.h Src/globals.h.orig Src/hashtable.c Src/hashtable.h Src/
hashtable.h.orig Src/hashtable.o Src/hashtable.pro Src/hist.c Src/hist.c.orig Sr
c/hist.o Src/hist.pro Src/init.c Src/init.c.orig Src/init.o Src/init.pro Src/inp
ut.c Src/input.c.orig Src/input.o Src/input.pro Src/jobs.c Src/jobs.o Src/jobs.p
ro Src/lex.c Src/lex.c.orig Src/lex.o Src/lex.pro Src/linklist.c Src/linklist.o
Src/linklist.pro Src/loop.c Src/loop.o Src/loop.pro Src/makepro.sed Src/math.c S
rc/math.o Src/math.pro Src/mem.c Src/mem.o Src/mem.pro Src/params.c Src/params.c
.orig Src/params.o Src/params.pro Src/parse.c Src/parse.c.orig Src/parse.o Src/p
arse.pro Src/prototypes.h Src/prototypes.h.orig Src/signals.c Src/signals.h Src/
signals.o Src/signals.pro Src/signames.awk Src/signames.h Src/subst.c Src/subst.
o Src/subst.pro Src/system.h Src/tags Src/text.c Src/text.o Src/text.pro Src/uti
ls.c Src/utils.c.orig Src/utils.o Src/utils.pro Src/version.h Src/watch.c Src/wa
tch.o Src/watch.pro Src/zle.h Src/zle_bindings.c Src/zle_bindings.o Src/zle_bind
ings.pro Src/zle_hist.c Src/zle_hist.o Src/zle_hist.pro Src/zle_main.c Src/zle_m
ain.c.orig Src/zle_main.o Src/zle_main.pro Src/zle_misc.c Src/zle_misc.o Src/zle
_misc.pro Src/zle_move.c Src/zle_move.o Src/zle_move.pro Src/zle_refresh.c Src/z

With one blank line at the end of the screen, and the cursor on the "c" of
"intro.ms Doc/...".  Scrolled off the top of the screen is:

zagzig[38] echo ChangeLog Doc Doc/Makefile Doc/Makefile.in Doc/ansi2knr.man Doc/

If you then type the <redisplay> binding, you get:

_misc.pro Src/zle_move.c Src/zle_move.o Src/zle_move.pro Src/zle_refresh.c Src/

With the cursor on the "r" in "Src/zle_move.c".

I don't know why the first expansion uses only 25 lines.  The second bug
with the blank line at the end of the screen and the prompt scrolled off
is caused by auto-wraparound in the xterm, but if you turn that off, the
line *never* wraps, so you can never see more than the last line of the
expansion.  The third bug is just weird.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Zle display bug with LONG expansions
  1996-07-11 17:00 Zle display bug with LONG expansions Bart Schaefer
@ 1996-07-11 18:32 ` Zoltan Hidvegi
  1996-07-11 22:18   ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Zoltan Hidvegi @ 1996-07-11 18:32 UTC (permalink / raw)
  To: schaefer; +Cc: zsh-workers

> In an 80x32 (or smaller?) xterm, do the following:
> 
> zagzig[38] echo **/*<TAB>

zle doen not handle the case when a line does not fit onto the screen.

> I don't know why the first expansion uses only 25 lines.  The second bug
> with the blank line at the end of the screen and the prompt scrolled off
> is caused by auto-wraparound in the xterm, but if you turn that off, the
> line *never* wraps, so you can never see more than the last line of the
> expansion.  The third bug is just weird.

Geoff told me that for some reason zsh have to know in advance wether the
current terminal automatically wraps the line.  He is probably right since
some terminals start a new line when a character is printed in the last
column while most terminals start a new line only is a character is printed
after the last column.  It uses the termcap information to determine wether
the terminal automatically wraps.  Unfortunately this means that if
auto-wrap is turned off in xterm, zle will stop working :-).  I do not like
it either but I do not know how can this be fixed.  I do not know much
about zle_refresh.c in general.  It is mostly written (or rewritten) by
Geoff.

Zoltan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Zle display bug with LONG expansions
  1996-07-11 18:32 ` Zoltan Hidvegi
@ 1996-07-11 22:18   ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1996-07-11 22:18 UTC (permalink / raw)
  To: Zoltan Hidvegi; +Cc: zsh-workers

On Jul 11,  8:32pm, Zoltan Hidvegi wrote:
} Subject: Re: Zle display bug with LONG expansions
}
} > In an 80x32 (or smaller?) xterm, do the following:
} > 
} > zagzig[38] echo **/*<TAB>
} 
} zle doen not handle the case when a line does not fit onto the screen.

Well, I know it doesn't handle it the way it does when a line does fit,
but it's obviously trying to do *something*.

} Geoff told me that for some reason zsh have to know in advance wether the
} current terminal automatically wraps the line.  He is probably right since
} some terminals start a new line when a character is printed in the last
} column while most terminals start a new line only is a character is printed
} after the last column.

Right; if zsh doesn't know about autowrap, and tries to print a newline
after the $COLUMNS'th character, you could end up with blank lines between
each two displayed lines.

But if zsh knows enough to avoid printing the newline because the terminal
autowraps, then it also ought to be able to avoid this.

Just mention it in etc/BUGS if nobody knows how to fix it ...

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Zle display bug with LONG expansions
@ 1996-07-12 11:40 Geoff Wing
  0 siblings, 0 replies; 4+ messages in thread
From: Geoff Wing @ 1996-07-12 11:40 UTC (permalink / raw)
  To: zsh-list

:On Jul 11,  8:32pm, Zoltan Hidvegi wrote:
:} Subject: Re: Zle display bug with LONG expansions
:} > In an 80x32 (or smaller?) xterm, do the following:
:} > zagzig[38] echo **/*<TAB>
:} zle doen not handle the case when a line does not fit onto the screen.

It used to work though there were one or two bugs.  I'll be fixing it.

:Well, I know it doesn't handle it the way it does when a line does fit,
:but it's obviously trying to do *something*.
:} Geoff told me that for some reason zsh have to know in advance wether the
:} current terminal automatically wraps the line.  He is probably right since
:} some terminals start a new line when a character is printed in the last
:} column while most terminals start a new line only is a character is printed
:} after the last column.

I used to have it so automargin didn't matter but it didn't work on about one
out of hundreds of terminal types (some type of xterm, SGI I think(?)).  And
it simplified the code by an enormous amount.  However, you can now use COLUMNS
to fake/force column width (what a bonus :-)
-- 
Mason [G.C.W]  mason@werple.mira.net.au    "Hurt...Agony...Pain...LOVE-IT"



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-07-12 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-11 17:00 Zle display bug with LONG expansions Bart Schaefer
1996-07-11 18:32 ` Zoltan Hidvegi
1996-07-11 22:18   ` Bart Schaefer
1996-07-12 11:40 Geoff Wing

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).