zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Fun redraw issue with double-width characters
Date: Sun, 24 Oct 2010 14:11:08 +0200	[thread overview]
Message-ID: <AANLkTinpzD04E3cm+myCUDVEXvhUhQc7VyyNzz2WxzvL@mail.gmail.com> (raw)

I lied about the "fun".

I got a random thought, "what if i enter five doublewidth characters,
then go back to the start and enter a bunch of spaces". Turns out
doing that causes the line to clear and cursor to move up one line.
Doesn't happen with four or less. Long story short, it happens only if
ich1 is defined in the terminfo for the current $TERM, which it
happens to be for rxvt-unicode, but also for rxvt. It doesn't matter
if you're using xterm or rxvt or urxvt, just set TERM=rxvt, enter five
ま and go back to the start and hold down space. I don't really know
where to begin debugging this. I checked strace output and these lines
are what zsh does when there are two, one and zero cells remaining on
the line, respectively (note that the redraw issue happens not on
wrap, but the step before).

write(10, " \343\201\276\343\201\276\343\201\276\343\201\276\343\201\276\33[10D",
21) = 21
write(10, "\33[@ \33[10C\33[K\33[10D", 17) = 17
write(10, "\33[@ \33[9C \r\33[K\33[A\33[84C", 21) = 21

If i remove the ich1 entry from terminfo (it's the \33[@ bit), i don't
have the problem.

write(10, " \343\201\276\343\201\276\343\201\276\343\201\276\343\201\276\33[10D",
21) = 21
write(10, " \343\201\276\343\201\276\343\201\276\343\201\276\343\201\276\33[10D",
21) = 21
write(10, " \343\201\276\343\201\276\343\201\276\343\201\276\343\201\276\33[K\33[10D",
24) = 24

-- 
Mikael Magnusson


             reply	other threads:[~2010-10-24 12:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24 12:11 Mikael Magnusson [this message]
2010-10-24 18:12 ` Peter Stephenson
2010-10-25  4:14   ` Mikael Magnusson
2010-10-25 14:31     ` Bart Schaefer
2011-05-27  1:28     ` Mikael Magnusson
2011-05-27  8:44       ` Peter Stephenson

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=AANLkTinpzD04E3cm+myCUDVEXvhUhQc7VyyNzz2WxzvL@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).