diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-04-01 10:06:39 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-04-01 10:06:39 +0000 |
commit | dfefb9831d439c0293b6de2b1752f21588966a90 (patch) | |
tree | bd19487f762ea64e3193ffc18cec524927e9115f | |
parent | c52da9dab38f3ac58b233fa6f619cb3e8d9a0cdc (diff) | |
download | vim-dfefb9831d439c0293b6de2b1752f21588966a90.zip |
updated for version 7.1-286
-rw-r--r-- | src/normal.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c index eda2ad38a..d3ce6a886 100644 --- a/src/normal.c +++ b/src/normal.c @@ -8345,6 +8345,7 @@ nv_wordcmd(cap) int n; int word_end; int flag = FALSE; + pos_T startpos = curwin->w_cursor; /* * Set inclusive for the "E" and "e" command. @@ -8405,8 +8406,9 @@ nv_wordcmd(cap) else n = fwd_word(cap->count1, cap->arg, cap->oap->op_type != OP_NOP); - /* Don't leave the cursor on the NUL past the end of line. */ - if (n != FAIL) + /* Don't leave the cursor on the NUL past the end of line. Unless we + * didn't move it forward. */ + if (lt(startpos, curwin->w_cursor)) adjust_cursor(cap->oap); if (n == FAIL && cap->oap->op_type == OP_NOP) diff --git a/src/version.c b/src/version.c index ad56d62a8..ef3fc0da6 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 286, +/**/ 285, /**/ 284, |