Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Regression in bracketed-paste-magic (not in 5.2, but affects 5.3's test releases)
- X-seq: zsh-workers 40230
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Regression in bracketed-paste-magic (not in 5.2, but affects 5.3's test releases)
- Date: Sat, 24 Dec 2016 00:28:46 -0800
- 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=MM9tf13z8bLf4VxKu7s9zejHmhTnlm/GUqdSeswDthc=; b=JAaMsxF5jUocCqjxZWl0lX9Nb4CAQCB2FxWEfRZJYBDBvwRzwLPm3uOGp00C3lHMg6 4tTObHBmD4BaNvpqqeIaNi3ztLbMmk9IRlJzkQT0A1EjUCg18eeNZWXUEW24FPtYd+67 iWMXep78TRaSyMMj/KxgCXiIJvY9oVf8HDg/ANKR+ekA/cR4WcF9+4Yh0iIUaPhMS2If 6RPkCQhpBPK5rrFl2Pz5kReJBBAUVixQIauUF6ode04RlFa+uQxs+ZFo2Ueuj7ZOuTU2 1UjJhecgBkhAouqnmLoBFZVJD4KJj8SJwHXXOwkB8JrOBABQ/TM+BjOCoJzxHl87eOr/ ZD9w==
- In-reply-to: <13854.1481114391@hydra.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <B3CEC842-B789-472A-8C8B-89391950787A@gmail.com> <CAH+w=7ZbZdfN7rhXQ-yi4_kqyjyAv1w8B7hKi55TPEBnc5Yfvg@mail.gmail.com> <13854.1481114391@hydra.kiddle.eu>
On Dec 7, 1:39pm, Oliver Kiddle wrote:
}
} In this particular case, the problem is that fc -p doesn't result
} in a call to zle's remember_edits(). remember_edits() updates the
} table of history entries for the current line. The edit associated
} with doing BUFFER= CURSOR=1 is thus lost. So when it does the
} undo, the line is first restored when the history line is reselected
} and then the contents are duplicated when the effect of clearing
} $BUFFER is undone.
This reminds me of a question I had when 38579 was applied: What's
the point of assigning CURSOR=1 here? If BUFFER is empty, the only
valid value of CURSOR is 0 (isn't it?), and the assignment to BUFFER
resets CURSOR implicitly as far as I can tell.
} What I would suggest for 5.3 is the patch below. [...]
}
} If you're wondering why I suggest this rather than adding a hook
} to call remember_edits(), it is because, for a proper post-5.3
} patch, fc -p wouldn't actually change the current history line.
Now that 5.3.1 is out, I've re-commited bracketed-paste-magic to its
state after 38579 plus the patch in this thread (40118), in spite of
my question above. We can now begin fiddling with the proper post-5.3
fix to "fc -p".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author