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,FREEMAIL_FROM,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 d14d70f5 for ; Mon, 4 Feb 2019 02:15:47 +0000 (UTC) Received: (qmail 8519 invoked by alias); 4 Feb 2019 02:15:31 -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: 44037 Received: (qmail 14066 invoked by uid 1010); 4 Feb 2019 02:15:31 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f68.google.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(209.85.210.68):SA:0(-2.0/5.0):. Processed in 1.614335 secs); 04 Feb 2019 02:15:31 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=1px8X2MGeIYNtOE8KIE2p+RUHIEzSMPPDLMS/7lHCac=; b=FDYw2ODZO/Bfpo8suAYc7h+BfqYVhR1RuTLJKKi1evTT170bxSVOOBYvONkkZuAwTs 8No8AsiDjdkNyRsl5ixJRAZKbcp/AoVsz1I+hPEqeQx4pnqchz+luKUt5mW/Tyz83Zbk oZ3QSZALCfcMA9aHmKIN5ILGgb8DeW+1yHxB9/unEomHhgVdUerqELaQ6Wbn7f5EOCNz Hx4lkySIvmrf5d2p63alED0dHssxcqoWL8Jlh/4G1ixJa4JzyXISjbzKze5fsDSVxA7e SZS9IE0xQKm5N7ZxRHbqXOXTHYPEKx1X6En9wMnHdr1keBCcs88IOkFpRswwkm4CDCnZ r8+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=1px8X2MGeIYNtOE8KIE2p+RUHIEzSMPPDLMS/7lHCac=; b=o/K+ikMjS4zrEfa5wchSlzUz4h6YsMyCR8pMWOwoHW1sVaM6OvKk4yHcR52v6fVYso noDJHZtI6Ld42sDrwVi9psLNzupDQfZr3DkNcFBeUbf8Xn3pQHM9OZq2wDdiR6lm9sgN miRJd4Nse073VArxyyHbWUfv+PFGxgiFvGtcMeoqNQXNCPyv52YYqTGENZF9D4YZvgqA OxLfJSNNtDDgO/Xw6gfBcSy/ltZDyFSG4nRk0nWWFspECgbEGveCZIsLl3/hgcmZanZS mcDKf6OEzPno3KBjUjepcQX25DJsl6pJvRq8mCq6dnFSoydwBNxDWKv9WoHI5NS4lD1V GgdA== X-Gm-Message-State: AHQUAuYPbLqDyVT6F4thi3riHQTtHS2Y7TEbPxA8pIIZZSs+/HsOuFAH GlnFI1Nkw2nuPzZsuMFeKbfvZKCax2ss7YLnRy3gYZsQ X-Google-Smtp-Source: AHgI3IZhfmzNdDU6KpHCLQ+ipSiLwfNrD1tgEc847ozLOPkJYpg9wKR09VxuxouoQl8nMn7+ZJ/DMbs0PCLzoXlV1kY= X-Received: by 2002:a9d:3bc7:: with SMTP id k65mr9684278otc.11.1549246526244; Sun, 03 Feb 2019 18:15:26 -0800 (PST) MIME-Version: 1.0 References: <20190203215711.sofrde7s4lb7nttb@Daniels-MacBook-Air.local> In-Reply-To: <20190203215711.sofrde7s4lb7nttb@Daniels-MacBook-Air.local> From: Sebastian Gniazdowski Date: Mon, 4 Feb 2019 03:15:13 +0100 Message-ID: Subject: Re: [PATCH] Support true colours via termcap interface To: zsh-workers Content-Type: text/plain; charset="UTF-8" > @@ -1652,8 +1652,10 @@ match_colour(const char **teststrp, int is_fg, int colour) On Sun, 3 Feb 2019 at 22:57, Daniel Tameling wrote: > > Dear all, > > ncurses recently added support for 24 bit colour terminals. It kind of > works out of the box with zsh, except for the hardcoded 256 colour > limit in match_colour. olor.red << 8) + color.green) << 8) + color.blue; (...) > > - return on | (is_fg ? TXT_ATTR_FG_24BIT : TXT_ATTR_BG_24BIT) | > - (zattr)colour << shft; > + if (tccolours != 0x1000000 || colour < 8) { > + return on | (is_fg ? TXT_ATTR_FG_24BIT : > + TXT_ATTR_BG_24BIT) | (zattr)colour << shft; > + } > } else if (colour <= -2) { > return TXT_ERROR; > } I wonder what this change causes. Because to use the termcap for 24 bit sequences, noe would have to lessen the following conditions in set_colour_attribute(): Line 2040: if (!def && !use_truecolor && Line 2041: (is_default_zle_highlight && (colour > 7 || use_termcap))) Line 2042: { I.e. remove or in other way lessen the use_truecolor condition. Without this the true color output will be bypassing termcap. Currently, the code `print -P %F{16763955} ' DOESN'T work, so your change does something that makes it working, however the first code example: print -P %F{'#ffcc33'} test Works with current code (ie. without the patch). -- Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org