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

PATCH: 3.1.5 or 3.0.5 - vi-forward-word gets stuck at end of line



When editing a multi-line buffer, vi-forward-word won't cross end of line
when iident() is true for the character immediately before the newline.

This patch is against 3.1.5 but can be applied to Src/zle_word.c in 3.0.5.

Index: Src/Zle/zle_word.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Src/Zle/zle_word.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 zle_word.c
--- zle_word.c	1998/06/01 17:08:46	1.1.1.1
+++ zle_word.c	1998/11/22 01:43:14
@@ -73,7 +73,7 @@
 		cs++;
 	if (wordflag && !n)
 	    return;
-	while (cs != ll && iblank(line[cs]))
+	while (cs != ll && (iblank(line[cs]) || line[cs] == '\n'))
 	    cs++;
     }
 }

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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