From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28957 invoked by alias); 24 Oct 2010 12:11:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28362 Received: (qmail 7483 invoked from network); 24 Oct 2010 12:11:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=XUEyCM8MTLKp88PNGA4qKzwO+aRykHmtoV00orbbIvQ=; b=PrKeaHLllvNJsQ3+vePmIBl4yDq5FKvox97Vb4eD1ZoIIdZ6j/yiRUmM+NhOBW492A g5AttORk4wSSuAJaQjTtXBh3rhKBDYuGUfivkD1FAWvhyIwuAerq23Ctd8qsoVhZQx0W eBio63f4bwdDOvkLqH6CZfuv06AzGkJLtO/L8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=gRjgdpcqs+sYw0ntGqmxnxNdK79mGUa+96tTNo4IGID9PvQ8oJfGAuPGA4N0c7voAt R2OltcEqiu6EAOg7AXgShj7RY05FakxgN+6PIBzCoTh7XZwa5trCMY2JN33bozs0uQ6P AlK4g+a8WU3kiKEpicQh+KLpejTBErRdOVQk4= MIME-Version: 1.0 Date: Sun, 24 Oct 2010 14:11:08 +0200 Message-ID: Subject: Fun redraw issue with double-width characters From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=3Drxvt, enter five =E3=81=BE 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) =3D 21 write(10, "\33[@ \33[10C\33[K\33[10D", 17) =3D 17 write(10, "\33[@ \33[9C \r\33[K\33[A\33[84C", 21) =3D 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) =3D 21 write(10, " \343\201\276\343\201\276\343\201\276\343\201\276\343\201\276\33= [10D", 21) =3D 21 write(10, " \343\201\276\343\201\276\343\201\276\343\201\276\343\201\276\33= [K\33[10D", 24) =3D 24 --=20 Mikael Magnusson