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

bindkey '^@' self-insert => ZLE gets confused



-----BEGIN PGP SIGNED MESSAGE-----

The patch below prevents the insertion of the NUL character into the
edit buffer.  At the moment, quoted-insert won't allow a NUL, but
self-insert will.  I change this so that self-insert will reject a NUL,
and quoted-insert will simply pass a NUL on to selfinsert().

 -zefram

      *** Src/zle_misc.c.1.1	1995/07/19 02:37:42
      --- Src/zle_misc.c	1995/07/19 03:04:26
      ***************
      *** 38,43 ****
      --- 38,47 ----
        {
            int ncs = cs + mult;
        
      +     if(!c) {
      + 	feep();
      + 	return;
      +     }
            if (complexpect && isset(AUTOPARAMKEYS)) {
        	if (complexpect == 2 && c == '}') {
        	    if (!menucmp || line[cs-1] == '/' || addedsuffix) {
      ***************
      *** 400,409 ****
        #ifndef HAS_TIO
            setterm();
        #endif
      !     if (c > 0)
      ! 	selfinsert();
      !     else
        	feep();
        }
        
        /**/
      --- 404,413 ----
        #ifndef HAS_TIO
            setterm();
        #endif
      !     if (c < 0)
        	feep();
      +     else
      + 	selfinsert();
        }
        
        /**/

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQBVAgUBMAx6lmWJ8JfKi+e9AQEiVwH/Q3SismHCimni/aalCM9EklE14zZbwdDa
GrnQK00N2uvOz8ST6BQgWWExwi6xcCjJNKAKkVU/YQemkZLTlQh52w==
=jUwM
-----END PGP SIGNATURE-----



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