aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
3770 if (c1 == 27) { // ESC- user changed mind and wants out 3770 if (c1 == 27) { // ESC- user changed mind and wants out
3771 c = c1 = 27; // Escape- do nothing 3771 c = c1 = 27; // Escape- do nothing
3772 } else if (strchr("wW", c1)) { 3772 } else if (strchr("wW", c1)) {
3773 ml = 0; // multi-line ranges aren't allowed for words
3773 if (c == 'c') { 3774 if (c == 'c') {
3774 // don't include trailing WS as part of word 3775 // don't include trailing WS as part of word
3775 while (isblank(*q)) { 3776 while (isspace(*q) && q > p) {
3776 if (q <= text || q[-1] == '\n')
3777 break;
3778 q--; 3777 q--;
3779 } 3778 }
3780 } 3779 }