From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
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 [thread overview]
Message-ID: <161224002846.ZM27351@torch.brasslantern.com> (raw)
In-Reply-To: <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".
prev parent reply other threads:[~2016-12-24 8:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 2:57 Zhiming Wang
2016-12-07 3:25 ` Bart Schaefer
2016-12-07 4:02 ` Zhiming Wang
2016-12-07 12:39 ` Oliver Kiddle
2016-12-07 18:23 ` Zhiming Wang
2016-12-24 8:28 ` Bart Schaefer [this message]
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=161224002846.ZM27351@torch.brasslantern.com \
--to=schaefer@brasslantern.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).