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

vi-forward-char fix



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

The patch below fixes a bug in vi-forward-char, that caused it not to
feep() sometimes when it should.

 -zefram

      *** 1.2	1995/07/21 22:10:34
      --- zle_move.c	1995/07/22 18:20:35
      ***************
      *** 251,270 ****
        void
        viforwardchar(void)
        {
            if (mult < 0) {
        	mult = -mult;
        	vibackwardchar();
        	return;
            }
      !     if (cs == ll || line[cs] == '\n') {
        	feep();
        	return;
            }
      !     while (mult--) {
      ! 	if (cs == findeol())
      ! 	    break;
        	cs++;
      -     }
        }
        
        /**/
      --- 251,268 ----
        void
        viforwardchar(void)
        {
      +     int lim = findeol() - (bindtab == altbindtab);
            if (mult < 0) {
        	mult = -mult;
        	vibackwardchar();
        	return;
            }
      !     if (cs == lim) {
        	feep();
        	return;
            }
      !     while (mult-- && cs != lim)
        	cs++;
        }
        
        /**/

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

iQBVAgUBMBFCF2WJ8JfKi+e9AQFuZwIAmsHeKCVYYAEGTlmGpKBJ4a1NODO2DdTs
dRYqV5GEq49k+W4AXPBM2VumjDX6y0tcDXGVkTiPM13gJYu4QzCxWQ==
=fZN4
-----END PGP SIGNATURE-----



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