Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: parse from even deeper in hell
On Mon, Feb 23, 2015 at 1:57 PM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> On Mon, 23 Feb 2015 12:36:07 +0000
> Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
>> On Mon, 23 Feb 2015 12:35:51 +0100
>> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> > I figured out that when we assign lineptr after fiddling with it, we
>> > also need to update start, it records the location of *lineptr on
>> > entry to the function, and is used to calculate things later on. With
>> > that addition, the unmetafy + metafy mostly works. insert-last-word
>> > still gets "stuck" on words that came from the old metafication and
>> > starts over from the end of history, leaving the old word in place.
>>
>> What's the line this happens with? Is it the same as the one that
>> originally failed?
>
> Yes, I see it is.
If you start dev-0 and run
echo た
then you'll end up with a trouble-causing entry in your history file.
Simply holding down alt-. in a new dev-1 shell then just inserts a
bunch of た forever for me.
>> I wonder if it's getting information by some other path, though it seems
>> strange the last word wouldn't come from the bit we've apparently fixed
>> up.
At least the function calling this function seems to store the raw
string in lasthist.text, but that's outside the while loop, so I think
only for the final history entry? I get my problem even when the bad
string is in an earlier line.
Oh, there's also this line,
he->node.nam = ztrdup(pt);
(pt is the history line)
Do we want to move the whole thing before that? I didn't look too
closely at this function yet.
> Ah, simply moving the hunk up seems to help this problem, at least the
> one I'm seeing.
>
> I've also implemented the suggestion of skipping the character
> after any Meta found, though we need to check that's not '\0' since
> this is has come from the big wide world.
>
> Anything still broken?
This patch works as well for me as my previous one.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author