aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/editors/vi.c b/editors/vi.c
index c4360f8d3..dfef42019 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3770,11 +3770,10 @@ static void do_cmd(int c)
if (c1 == 27) { // ESC- user changed mind and wants out
c = c1 = 27; // Escape- do nothing
} else if (strchr("wW", c1)) {
+ ml = 0; // multi-line ranges aren't allowed for words
if (c == 'c') {
// don't include trailing WS as part of word
- while (isblank(*q)) {
- if (q <= text || q[-1] == '\n')
- break;
+ while (isspace(*q) && q > p) {
q--;
}
}