Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Test failures on MacOS with latest pull from git



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



Messages sorted by: Reverse Date, Date, Thread, Author