zsh-workers
 help / color / mirror / code / Atom feed
* vi-forward-char fix
@ 1995-07-22 18:23 Zefram
  0 siblings, 0 replies; only message in thread
From: Zefram @ 1995-07-22 18:23 UTC (permalink / raw)
  To: Z Shell workers mailing list

-----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-----


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-07-23  1:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-07-22 18:23 vi-forward-char fix Zefram

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).