From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Test failures on MacOS with latest pull from git
Date: Sat, 1 Nov 2014 03:08:11 +0900 [thread overview]
Message-ID: <C4ED0FEB-F1F4-4A14-8B3B-B43D26318E0C@kba.biglobe.ne.jp> (raw)
In-Reply-To: <alpine.LRH.2.00.1410301625110.26348@toltec.zanshin.com>
I got the same error (BUFFER: SeE) on my Macs (10.8 and 10.9),
and also on FreeBSD 10.0.
But If I interactively type
word<Ctrl-W>line<Esc>ddiSE<Esc>P<Ctrl-P>
then I got the expected result, i.e., 'SwordE' with cursor on 'd'.
This suggests me that the problem is in the pty library of BSD's
(or zpty module of zsh). I suspect that '^W' is treated as the
'werase' special character by the tty of slave zsh.
The following patch is a simple workaround (use ^K instead of ^W),
and seems to work on both Mac and FreeBSD.
(It would be better if we could "fix" zpty so that ^W works as expected
on Mac/BSD, but I don't know wether it is possible or not.)
Jun
diff --git a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst
index bd3105d..9c92beb 100644
--- a/Test/X02zlevi.ztst
+++ b/Test/X02zlevi.ztst
@@ -116,29 +116,30 @@
>BUFFER: stnwararart
>CURSOR: 9
+ zpty_run 'bindkey "^K" vi-backward-kill-word'
zpty_run 'bindkey -a "^P" yank-pop'
- zletest $'word\C-wline\eddiSE\eP\C-P'
+ zletest $'word\C-kline\eddiSE\eP\C-P'
0:line based put before followed by character based yank-pop
>BUFFER: SwordE
>CURSOR: 4
- zletest $'line\eddiword\C-w\eiSE\eP\C-P'
+ zletest $'line\eddiword\C-k\eiSE\eP\C-P'
0:character based put before followed by line based yank-pop
>BUFFER: line
>SE
>CURSOR: 0
- zletest $'one two three\C-w\C-w\C-wSE\e0p\C-P\C-P'
+ zletest $'one two three\C-k\C-k\C-kSE\e0p\C-P\C-P'
0:put after cycled twice with yank-pop
>BUFFER: SthreeE
>CURSOR: 5
- zletest $'word\C-wline\eddiSE\ehp\C-P'
+ zletest $'word\C-kline\eddiSE\ehp\C-P'
0:line based put after followed by character based yank-pop
>BUFFER: SwordE
>CURSOR: 4
- zletest $'line\eddiword\C-w\eiSE\ehp\C-P'
+ zletest $'line\eddiword\C-k\eiSE\ehp\C-P'
0:character based after before followed by line based yank-pop
>BUFFER: SE
>line
next prev parent reply other threads:[~2014-10-31 18:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 23:27 Bart Schaefer
2014-10-31 0:53 ` Bart Schaefer
2014-10-31 12:56 ` Oliver Kiddle
2014-10-31 13:27 ` Vin Shelton
2014-10-31 14:06 ` Bart Schaefer
2014-10-31 18:08 ` Jun T. [this message]
2014-11-03 18:18 ` Bart Schaefer
2014-11-04 14:59 ` Jun T.
2014-11-08 20:16 ` Bart Schaefer
2014-11-08 22:11 ` Oliver Kiddle
2014-11-10 12:50 ` Jun T.
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=C4ED0FEB-F1F4-4A14-8B3B-B43D26318E0C@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--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).