zsh-workers
 help / color / mirror / code / Atom feed
* Problem with cursor position after wrapped completion lists
@ 1999-07-02 13:42 Oliver Kiddle
  1999-07-08 16:26 ` Big problems " Andrej Borsenkow
  0 siblings, 1 reply; 9+ messages in thread
From: Oliver Kiddle @ 1999-07-02 13:42 UTC (permalink / raw)
  To: zsh-workers

The completion lists (as generated from the -Y option) don't work very
well when lines wrap at the end of the line:

cd ~+<tab>

If the list then contains lots of stupidly long pathnames some of which
wrap at the end of the terminal. For example:
0      
/home/ccm/ccmlib/ccmlib_d_log_file_libraries.ss/b3_stubs.wrk/ccm_test_utilities
1      
/home/native_rs6000/test/ccmcda/ccmlm0_log_manager.ss/okiddle.wrk/ccmlm0
etc...

The cursor is then placed a couple of lines below where it should be
because the wrapping has caused it to be lower than zsh thinks it is.

I suppose the only way of fixing this is by controlling the wrapping
directly from zsh unless there is a way of knowing how the terminal is
dealing with lines wider than the terminal (wrapping or truncating
them).

Note that I am not to blame for the directory structure we have here
and that I could solve the problem for myself by modifying _tilde to
compact the directory's names to use references to various associative
arrays and variables which I have: so don't bother suggesting that I
use a few 'hash -d's or shorter directory names.

Oliver Kiddle


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Problem with cursor position after wrapped completion lists
@ 1999-07-02 13:53 Sven Wischnowsky
  1999-07-02 15:35 ` Oliver Kiddle
  0 siblings, 1 reply; 9+ messages in thread
From: Sven Wischnowsky @ 1999-07-02 13:53 UTC (permalink / raw)
  To: zsh-workers


Oliver Kiddle wrote:

> The completion lists (as generated from the -Y option) don't work very
> well when lines wrap at the end of the line:
> 
> cd ~+<tab>
> 
> If the list then contains lots of stupidly long pathnames some of which
> wrap at the end of the terminal. For example:

Err, this works for me -- of course the completion code takes care to
count the lines (including wrapping) correctly. However, this will
only work if the COLUMNS parameter is correctly set (and the terminal
doesn't do automatic word-wrapping like your mailer ;-).

Are you sure that your COLUMNS information is correct?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Problem with cursor position after wrapped completion lists
@ 1999-07-08  9:35 Sven Wischnowsky
  1999-07-08 10:04 ` Andrej Borsenkow
  0 siblings, 1 reply; 9+ messages in thread
From: Sven Wischnowsky @ 1999-07-08  9:35 UTC (permalink / raw)
  To: zsh-workers


Oliver Kiddle wrote:

> I tried it again and it seemed to work fine in the new xterms and
> aixterms which I created but after looking back in the aixterm where I'd
> had the problems, I realised what the cause was. There was one
> line in the list which was exactly 80 ($COLUMNS) characters wide.
> 
> xterm and aixterm seem to treat this differently: aixterm gives me a blank
> line after it whereas xterm doesn't. Zsh then places the cursor correctly
> only with the xterm.

Hm. I've had a look at this: the only solution I see is to make the
code check if the line it just printed is COLUMNS characters long
whenever it wants to print a newline. Since there are several ways how 
the different things are printed (display-lists, explanation strings, 
matches), fixing this can get quite ugly, so I better ask first: does
anybody see a better solution than to keep track of the number of
characters printed?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Problem with cursor position after wrapped completion lists
@ 1999-07-08 10:43 Sven Wischnowsky
  1999-07-08 10:57 ` Andrej Borsenkow
  0 siblings, 1 reply; 9+ messages in thread
From: Sven Wischnowsky @ 1999-07-08 10:43 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> I believe, that fixing it may be hard but not ugly. The best would be to have
> just one function that prints out all sort of output ... dunno, if this is
> currently possible.

Yes, I had a look at 4855 and the solution was clear, of course, but
we can't simply use one function for all cases because we don't want
that: explanation strings have to handle %-escapes, display-lists
should be printed literally, and matches should be printed in a way
that is called (in the code) `nice' (as in `nicezputs()').

Ok, so I'll have to bite the bullet...

Bye
 Sven

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

end of thread, other threads:[~1999-07-08 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-02 13:42 Problem with cursor position after wrapped completion lists Oliver Kiddle
1999-07-08 16:26 ` Big problems " Andrej Borsenkow
1999-07-02 13:53 Sven Wischnowsky
1999-07-02 15:35 ` Oliver Kiddle
1999-07-03  9:55   ` Andrej Borsenkow
1999-07-08  9:35 Sven Wischnowsky
1999-07-08 10:04 ` Andrej Borsenkow
1999-07-08 10:43 Sven Wischnowsky
1999-07-08 10:57 ` Andrej Borsenkow

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).