From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6917 invoked by alias); 27 Oct 2015 19:41:11 -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: 36987 Received: (qmail 10170 invoked from network); 27 Oct 2015 19:41:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=2lzjijiFG6sHSgHSs3CAi9Jq6MSL8SG6xMyfdydJJB4=; b=CVgtJNEO9UddJ5jcMf8Dah6CC/nZ79R9vwynHQGSkorPgoQSJQIH08iWOVUFyAoYZf /qOg47AMyHeL87+nL6xOs1LO7Wx70IqsI8SWJfivbgWQopouYzT9uk8dHideRkuLy/lA 4rv4CgA4GKwjazVB0Ng83IL8g1k+Kvl/UVP5GRDC80JKetVabDAUvvaDFST26tDpbGpb NddbS3gqw+tfpI28iP94k/ENfCMV21PMYESsTwGDpXLmm0Bk20+BcIosvspLWO4K9LuI MrJf5g55wJd7KSiLEan4MQh+8gZ/3AFP1y4/J9O1gnd8pcHKPxRzrDIZYk7p8sZo9xa9 lphA== MIME-Version: 1.0 X-Received: by 10.55.203.16 with SMTP id d16mr52440163qkj.51.1445974867689; Tue, 27 Oct 2015 12:41:07 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Oct 2015 20:41:07 +0100 Message-ID: Subject: Re: [PATCH] Index of element after width of characters From: Mikael Magnusson To: Sebastian Gniazdowski Cc: zsh workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Oct 27, 2015 at 6:18 PM, Sebastian Gniazdowski wrote: > Hello, > I had to implement horizontal scrolling of text and noticed that Asian > characters can have width of two. Scrolling via indexes of strings was > giving different speeds to normal and to the wide characters. + if(ynum >=3D 0) { put a space between "if (" + // Width 0 is treated immedietally =C3=A2=E2=82=AC=E2=80=9C an= y don't use c++ comments, avoid unicode for basic things like hyphens --=20 Mikael Magnusson