* digraph breaks out of history search
@ 2015-10-19 1:10 Phil Pennock
2015-10-19 1:58 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Phil Pennock @ 2015-10-19 1:10 UTC (permalink / raw)
To: zsh-workers
I can see what's happening, and why, but don't have good thoughts about
how to solve it. Perhaps someone else might?
% zsh -f
tungsten% echo $ZSH_VERSION
5.1.1
tungsten% autoload insert-composed-char ; zle -N insert-composed-char
tungsten% bindkey -e
tungsten% bindkey '^K' insert-composed-char
tungsten% echo £ <- entered with <ctrl-K>Pd
£
tungsten% echo foo
foo
tungsten% <- <ctrl-R><ctrl-K>Pd
becomes:
tungsten% £
Instead of searching back through history for the digraph-composed
character, we break out of history search and the digraph character is
inserted into the command-line immediately.
I think that this is because the function insert-composed-char is
using:
LBUFFER+=$ochar
and this isn't working with the mini-buffer.
Am I on the right path?
Short of diving into the zle internals, is there a way around this? I
can't see something like `self-insert` but taking a character parameter,
can't see a way to manipulate the input character before calling
`self-insert` (since `$KEYS` is read-only), can't see anything relevant
in zsh/parameter ... I'm stuck.
Thanks,
-Phil
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: digraph breaks out of history search
2015-10-19 1:10 digraph breaks out of history search Phil Pennock
@ 2015-10-19 1:58 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2015-10-19 1:58 UTC (permalink / raw)
To: Zsh hackers list
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
On Oct 18, 2015 6:26 PM, "Phil Pennock" <
zsh-workers+phil.pennock@spodhuis.org> wrote:
>
> I think that this is because the function insert-composed-char is
> using:
> LBUFFER+=$ochar
>
> and this isn't working with the mini-buffer.
>
> Am I on the right path?
I think the real issue is that history search has a very limited keymap in
which no user-defined widgets work.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-19 1:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-19 1:10 digraph breaks out of history search Phil Pennock
2015-10-19 1:58 ` Bart Schaefer
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).