zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Sven Wischnowsky" <wischnow@informatik.hu-berlin.de>,
	<zsh-workers@sunsite.auc.dk>
Subject: RE: Problem with cursor position after wrapped completion lists
Date: Thu, 8 Jul 1999 14:04:30 +0400	[thread overview]
Message-ID: <000001bec929$44f658f0$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <199907080935.LAA12042@beta.informatik.hu-berlin.de>

>
> 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?
>

No. There are two types of terminals. Some ttys wrap immediately after you
printed exactly COLUMNS lines. Some of them wrap first when COLUMNS+1th
character is printed. It means, that after you printed exactly COLUMNS of
characters you do not know, if your cursor is placed on current or next line. As
I have no idea if terminal description inludes such information, the only clean
way to solve it is to explicitly position cursor after exactly COLUMNS
characters were printed. Have you got a look at 4855? Among other things, it
makes Zsh to output '\r' in this case. Weird as it is, it works in both cases.
In the former case, additional character triggers new line; in the latter, we
are already on the new line so nothing changes. Note, that if you output
COLUMNS-1 or COLUMNS+1 characters, you won't get problem at all.

Note, that it only marginally relates to am attrubute. Both types of terminals I
have seen _did_ have am :-)

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.

/andrej


  reply	other threads:[~1999-07-08 10:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-08  9:35 Sven Wischnowsky
1999-07-08 10:04 ` Andrej Borsenkow [this message]
1999-07-08 10:18   ` Correction :-( " Andrej Borsenkow
1999-07-08 11:26     ` 4855 does not work in all cases Andrej Borsenkow
1999-07-08 12:09       ` Oliver Kiddle
1999-07-08 12:56         ` Andrej Borsenkow
1999-07-08 14:39           ` Oliver Kiddle
1999-07-08 15:26             ` Andrej Borsenkow
1999-07-09  8:42               ` Oliver Kiddle
1999-07-09  3:44       ` Geoff Wing
  -- strict thread matches above, loose matches on Subject: below --
1999-07-08 10:43 Problem with cursor position after wrapped completion lists Sven Wischnowsky
1999-07-08 10:57 ` 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-02 13:42 Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001bec929$44f658f0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).