zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Fun redraw issue with double-width characters
Date: Mon, 25 Oct 2010 07:31:46 -0700	[thread overview]
Message-ID: <101025073146.ZM27162@torch.brasslantern.com> (raw)
In-Reply-To: <AANLkTi=g=tVrmxK6XBoD=xzwK+C5yE1x5xXiMQAjc2km@mail.gmail.com>

On Oct 25,  6:14am, Mikael Magnusson wrote:
}
} I am asking this only out of curiosity, how come updates on the first
} line are done like [...]
} while updates on the second line (ie after wrapping everything) are
} done shorter, like [...]

There's a complicated algorithm based on querying terminfo/curses for
the "expense" involved in doing any given screen update, which is used
to decide whether it's more efficent to send terminal controls to move
the screen image around, or instead to simply overwrite what's there.

It's possible that the computation of "expense" is wrong when some of
the characters to be moved are multibyte, but it also might be that what
constitutes "expense" doesn't map directly to the number of bytes that
pass through write().


  reply	other threads:[~2010-10-25 14:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24 12:11 Mikael Magnusson
2010-10-24 18:12 ` Peter Stephenson
2010-10-25  4:14   ` Mikael Magnusson
2010-10-25 14:31     ` Bart Schaefer [this message]
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=101025073146.ZM27162@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).