aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-02-04 11:19:44 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-02-04 11:19:44 +0000
commite965f9083bb5b97ff41ab03cac95f040b6d8399d (patch)
treecbe5216947fcbbe1aca214fae0c2f1d3575d590e /editors/vi.c
parentd47629f4eb5bc0e0358f1ff3815edf5d1ef280de (diff)
downloadbusybox-w32-e965f9083bb5b97ff41ab03cac95f040b6d8399d.tar.gz
busybox-w32-e965f9083bb5b97ff41ab03cac95f040b6d8399d.tar.bz2
busybox-w32-e965f9083bb5b97ff41ab03cac95f040b6d8399d.zip
Richard Kojedzinszky writes:
Hi, I've noticed the bug also, and here is another patch for it. I hope it'll not introduce more bugs. Not too nice, but works for me. Here it is for busybox-1.00-pre6 git-svn-id: svn://busybox.net/trunk/busybox@8401 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/editors/vi.c b/editors/vi.c
index ac3a175af..57b011444 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -19,7 +19,7 @@
19 */ 19 */
20 20
21static const char vi_Version[] = 21static const char vi_Version[] =
22 "$Id: vi.c,v 1.31 2004/01/21 10:59:45 bug1 Exp $"; 22 "$Id: vi.c,v 1.32 2004/02/04 11:19:44 andersen Exp $";
23 23
24/* 24/*
25 * To compile for standalone use: 25 * To compile for standalone use:
@@ -1669,10 +1669,13 @@ static Byte find_range(Byte ** start, Byte ** stop, Byte c)
1669 q = dot; 1669 q = dot;
1670 } else if (strchr("wW", c)) { 1670 } else if (strchr("wW", c)) {
1671 do_cmd(c); // execute movement cmd 1671 do_cmd(c); // execute movement cmd
1672 // if we are at the next word's first char 1672 // if we are at the next word's first char
1673 // step back one char 1673 // step back one char
1674 if (dot > text && isspace(dot[-1])) 1674 // but check the possibilities when it is true
1675 dot--; // move back off of next word 1675 if (dot > text && ((isspace(dot[0]) && !isspace(dot[0]))
1676 || (ispunct(dot[-1]) && !ispunct(dot[0]))
1677 || (isalnum(dot[-1]) && !isalnum(dot[0]))))
1678 dot--; // move back off of next word
1676 if (dot > text && *dot == '\n') 1679 if (dot > text && *dot == '\n')
1677 dot--; // stay off NL 1680 dot--; // stay off NL
1678 q = dot; 1681 q = dot;