From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: Daniel Shahaf <d.s@daniel.shahaf.name>,
Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] region_highlight+=( "$start $end standout" ) doesn't work as expected
Date: Sun, 9 Dec 2018 20:20:00 +0100 [thread overview]
Message-ID: <CAKc7PVBKnrmZTRZhd-_pjeyb8GnHAqz5t5zwzHZU23vYfXcVqQ@mail.gmail.com> (raw)
In-Reply-To: <53005dd0750e99fb654f5708a6e256dbea6f899a.camel@ntlworld.com>
On Sun, 9 Dec 2018 at 19:49, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
>
> > Could the problem be fixed, .. ASAP?
>
> I won't be working on this, but I can give some poiners.
>
> You'll need to look in Src/Zle/zle_refresh.c. You'll see the
> region_highlights variable that contains the information. There are 4
> special regions at the start --- see definition of
> N_SPECIAL_HIGHLIGHTS.
>
> There are two key points in turning this information into the output.
> One is following the comment "Calculate attribute based on region".
> That's where the information gets encoded into the array of characters
> to output, which remembers the attributes associated with the character
> based on the last thing to change.
>
> The other is inside settextattributes(), where the appropriate sequences
> are output. That's called at various points during the output, but only
> if we detect something has changed in them: zwcputc() is the key
> location, but you'll see there are others.
I think I've already resolved this in the patch in email "[PATCH] Make
256 color codes be based on zle_highlight array, not on termcap". The
function settextattributes() uses function from prompt.c:
set_colour_attribute(zattr atr, int fg_bg, int flags). It is there
where fg_start_code, etc. are read and set. Also, I think thath
zle_refresh.c code probably falls through to prompt.c –
output_colour(int colour, int fg_bg, int use_tc, int truecol, char
*buf), as I've had to change a condition there to not use termcap for
the 248 colors, but zle_highlight instead.
>
> > Could the problem be fixed, .. ASAP?
>
I was so pressured at this that I've done it myself :) it's in the
"[PATCH] Make 256 ..." email that contains the proposed patch.
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
next prev parent reply other threads:[~2018-12-09 19:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 7:03 Sebastian Gniazdowski
2018-12-07 1:42 ` Sebastian Gniazdowski
2018-12-07 7:45 ` Daniel Shahaf
2018-12-07 15:04 ` Sebastian Gniazdowski
2018-12-09 18:49 ` Peter Stephenson
2018-12-09 19:20 ` Sebastian Gniazdowski [this message]
2018-12-09 19:48 ` Peter Stephenson
2018-12-09 20:19 ` Sebastian Gniazdowski
2018-12-09 20:56 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKc7PVBKnrmZTRZhd-_pjeyb8GnHAqz5t5zwzHZU23vYfXcVqQ@mail.gmail.com \
--to=sgniazdowski@gmail.com \
--cc=d.s@daniel.shahaf.name \
--cc=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).