From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 441 invoked by alias); 16 Oct 2010 12:36:56 -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: 28355 Received: (qmail 29451 invoked from network); 16 Oct 2010 12:36:51 -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.212.43 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:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=do4UqUn3eMYmXIIBOSsL/ENdMDOqdxd0mpWAgNNLRYw=; b=gEML4ASpzpGiB8z7L6MGSJBIkChbziCvdjYyURDICHJBNqxS5KZaNXWlfrpJkoJtkt Q4fsd8df7JTZYXFy92aEv7f9wNr/pnKTQpHiqi/7OpBHvp6l2vTxOo7XmVfT/gmrVnZM 7wX5qqlDFa97mF8euuCIHQG8XLBTAO8rY5xqk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ctqsfCV6fa6ynSE5zZ+J0hKYABlFQsazCo5pobzGPz+W20hczDgKgF25AM8hFv91Rg OM0Loh7ESR0ufnL5tTxphFfsk1eWF0xVuAAq4YOw07sM/HvwJVBkY4i1NGAgjBcaFto5 mA3zfXkcZv863V6UqKF+k2HJpNC8q/G+ivvWs= MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 16 Oct 2010 14:36:45 +0200 Message-ID: Subject: Re: command line not refresh properly with wide chars when cursor would have been inside one From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 16 October 2010 13:21, Mikael Magnusson wrote: > zsh -f > % echo =E3=81=AE=E3=81=AE=E3=81=AE > % uuuuuu > % echo =E3=81=AE [cursor here] > > if you type one more (or less, or three or five more) letters, the > line refreshes properly, but when it would have ended up in the middle > of a wide char, the line gets cut off. This has bothered me for quite > some time but I've never been able to figure out the exact > circumstances before. Verified in latest cvs and 4.3.6 with -f. Actually the problem is when the previous line ends in a wide char in the new line, doesn't matter where the cursor is. Hmm, it seems the problem is somewhere in refreshline (surprise, right?). First all the characters of "echo =E3=81=AE" are printed one by on= e, but then ol is advanced past the end of the old string "uuuuuu" and somehow after that are =E3=81=AE=E3=81=AE=E3=81=AE which causes /* skip past all matching characters */ for (; nl->chr && ZR_equal(*ol, *nl); nl++, ol++, ccs++) ; to trigger, which is why the rest of the string isn't output. Why this happens is a bit of a mystery to me still. --=20 Mikael Magnusson