From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16823 invoked by alias); 23 Oct 2016 20:17:51 -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: 39718 Received: (qmail 11184 invoked from network); 23 Oct 2016 20:17:51 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f44.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.213.44):SA:0(0.0/5.0):. Processed in 0.125773 secs); 23 Oct 2016 20:17:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=29VbwhODoHGZbHWE3nZ6BKXeoAW76aOoac29u7S6fVA=; b=ecLxmDxkCM/rtuZrT0dmEhZjljFim29m7owTFg9wD0V7krS3g/FaF3YeDhQXT7kBpP sh/YZf/VoTOAJdLaMXVAlIOEjHJAMApl9posIfpkhm5eBRzfN8I8CsEh+sEdxqPqwB37 HgBS243G2tpjzGQl4P4YwdAsQCG2w0vXR5DtLfa23wyyIIIZY1tw/9HKY2Au85k+GjL/ pbCBE4ocFfndqV93LZWBOrBpNhZOPIgvgc2RIeobY5p8OuFkxl81mwI7lA/50Dg5ZjSM mYkIyRlZ3nkMlPM2pUl902MGAvcPxB+sSSpZDIqjejIyHG/eraWpbkx6dX861QvfKnZS BUAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=29VbwhODoHGZbHWE3nZ6BKXeoAW76aOoac29u7S6fVA=; b=eTfN/sBFGqmvi41BR+ojPTCYVPEYz+CiVQbhHx00jyWMZnINmLjMu6quZe6WrADgHw 3CJOndG2lyiz0DgRchqBfsXWPJhW5K4TlNpV16WbIqDwNTczyAyyjCx8/CsjPCT6AljE /wSE06xfWAwdB99uqZ9wuoQu3OM+G+pwewVNTNzTsqS5geRryKL3FmreKWM8Cyg89bce K1wA+wnuaSIrMHqAdxG3Y06sBbh7Xo/sCPHfxu4whasVZI3SYn0PA+09LRe96Fa8sGAO 6bM6C/NzvRqpoZa352NCdenV7Ri1xMTpzdRvWf/rwqru9b6xsmQUHblQGJFAvfqnbjdR 5eKQ== X-Gm-Message-State: ABUngvdjitAdnkWY5M/T/M8IZoVfzuAMH2uRxsgLdKb4jBk9IWrdFumcakNR7KLgw9a3ZA== X-Received: by 10.31.92.216 with SMTP id q207mr1119445vkb.147.1477247031443; Sun, 23 Oct 2016 11:23:51 -0700 (PDT) From: Bart Schaefer Message-Id: <161023112358.ZM3708@torch.brasslantern.com> Date: Sun, 23 Oct 2016 11:23:58 -0700 In-Reply-To: <20161023183048.3b6d21bb@ntlworld.com> Comments: In reply to Peter Stephenson "Re: zsh/complist colours improperly handle multibyte characters" (Oct 23, 6:30pm) References: <161020210735.ZM6446@torch.brasslantern.com> <20161023183048.3b6d21bb@ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: zsh/complist colours improperly handle multibyte characters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 23, 6:30pm, Peter Stephenson wrote: } } So something like this might be better? Yes, this appears to solve the issue, at least for multibyte characters that take up only one screen column (as you noted). } This is counting characters properly, but not taking into account the } width of the character may be greater than 1. As the outer loop is } assuming one position per character I don't know how to fix that Looks like doiscol() would need to have the character width passed down to it to correctly manipulate the color position arrays, and then both i += chrwid and cc += chrwid or something like that. As long as sendpos[] and curiscols[] don't change color in the middle of a multi-column character I think the output part should be OK ... but I'm not certain, either.