From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 72d9a677 for ; Sun, 9 Dec 2018 19:45:23 +0000 (UTC) Received: (qmail 15204 invoked by alias); 9 Dec 2018 19:45:12 -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: List-Unsubscribe: X-Seq: 43880 Received: (qmail 8578 invoked by uid 1010); 9 Dec 2018 19:45:12 -0000 X-Qmail-Scanner-Diagnostics: from wout2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(64.147.123.25):SA:0(-2.6/5.0):. Processed in 0.817453 secs); 09 Dec 2018 19:45:12 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=fm2; bh=P1Y mMH0puzhEaAarUYlMU9fLOe+j6HdrDUIPgCYlBUc=; b=lvzChI2tFBd97fwu57/ iTM2LO6g3l3uGkOlG+V9dhnVHoetBKWY7Ci3TljJWruMx0yYANIMwFRJC52M0oSg GDGPj0T3qxKtKYpZWP8PVfQfJtwiy+ENHONEMgcb/u9ZVaXwAILfQKF3eYnL6mK9 CxLkQdmQp3LSkmnupa6bxSGoSbrr+7MKo2/HvOVqHp3AY8FE67ryIqBXBPDPCZVU nC7EbODvzK5fE9HvpabivaW08WdUIdgFbtb2ajuUDDQAV+5pqxvq20BPdzr4NlAJ uqbz7QuYs03RUcpUubR5vguZLoHunFYXvCfDZzbXPLz0MqRrIk3LFbtJg7BzPlCF kRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=P1YmMH 0puzhEaAarUYlMU9fLOe+j6HdrDUIPgCYlBUc=; b=k0MFeJzUQoYehZiD2FcCI6 C74QxNdXfqmVlOSjwyz2CySYzh7ptZAUxy3EqVCKxbNpeEh+HQpfUflVBf57reHN AUBy9gpJIUEdmlc2Jp7Mu5O9pY7PqGpIk+pY1Ax4Ul/TU+UclEI6CiS51+cCqeg3 sGaeX2dMpehdjoaFHVNAQPDZ/tg34lXdAw2HMklikwoTiN+8cBdrA7wcVHyFcU5s 8CLnBaY04qspvpvgWfY9jy9L+U3slJCFgh30PCENhjSn/V292NseJfrASzx7bnrW X3PsH524xpxnwKcDWLUFA1eU3/VBEKPCNaixJxJtoRIp0rq3B7/UeCN7PKkQVmKA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudegfedgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvffukf hfgggtuggjfgesthdttddttdervdenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcu oegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqnecukfhppeejledrudektd drudduhedrudehheenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghl rdhshhgrhhgrfhdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Date: Sun, 9 Dec 2018 19:45:05 +0000 From: Daniel Shahaf To: Sebastian Gniazdowski Cc: Zsh hackers list Subject: Re: [PATCH] Make 256 color codes be based on zle_highlight array, not on termcap Message-ID: <20181209194505.zsuylzojjv3rebpl@tarpaulin.shahaf.local2> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sebastian Gniazdowski wrote on Sat, Dec 08, 2018 at 23:04:33 +0100: > Is the patch acceptable? I imagine someone might suspect there exists > a terminal that uses escape codes for first 8 colors, but some other > kind of codes, collected in termcap, for remaining 248 colors. Can > this be considered impossible to accept the patch? Might someone out there have a terminal whereunder the sequence ESC 8 ; 5 ; doesn't change the foreground color, but does something else? > BTW. I've made X04 zle tests more rock-solid, because the debug prints > I added to track the 256-color/zle_highlight issue were slowing down > Zle, and a rare phenomenon (not occurred from the time I've simplified > Zle, disabled the echoing of input text) became very often: Ctrl-D was > appearing too quickly after Ctrl-A. A sleep of 333 ms made the problem > go away, and I think the issue is solved, and Zle tests are quite rock > solid now. That's great. > commit 5dda212b3be3f1f12ad31e3d6543d367f987ee55 > Author: Sebastian Gniazdowski > Date: Sat Dec 8 22:42:49 2018 +0100 > > Instead of using termcap, 256-colours are based on zle_highlight entries > > Following code snippet performs the conversion of colour number to the > code to be emitted to terminal (the example shows foreground color > handling): > ... > strcpy(colseq_buf, fg_bg_sequences[fg_bg].start); > ... > } else if (colour > 7 && colour <= 255) { > ptr += sprintf(ptr, "8;5;%d", colour); > ... For future reference, it's better to post `git format-patch` output than `git show` output because the former can be applied easily (with git-am(1)) but the latter can't. Cheers, Daniel