summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/motion.txt3
-rw-r--r--src/normal.c2
-rw-r--r--src/testdir/test_normal.vim10
-rw-r--r--src/version.c2
4 files changed, 12 insertions, 5 deletions
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 46f968045a..2ddd1b9cec 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -255,7 +255,8 @@ g$ When lines wrap ('wrap' on): To the last character of
instead of going to the end of the line.
When 'virtualedit' is enabled moves to the end of the
screen line.
- *g<End>*
+
+ *g<End>* *g<kEnd>*
g<End> Like |g$| but to the last non-blank character
instead of the last character.
diff --git a/src/normal.c b/src/normal.c
index cbcfd746de..38229e96e5 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5823,7 +5823,7 @@ nv_g_dollar_cmd(cmdarg_T *cap)
int col_off = curwin_col_off();
int flag = FALSE;
- if (cap->nchar == K_END)
+ if (cap->nchar == K_END || cap->nchar == K_KEND)
flag = TRUE;
oap->motion_type = MCHAR;
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim
index 92d1134d7e..efda142d1d 100644
--- a/src/testdir/test_normal.vim
+++ b/src/testdir/test_normal.vim
@@ -4105,20 +4105,24 @@ func Test_normal_click_on_double_width_char()
endfunc
func Test_normal33_g_cmd_nonblank()
- " Test that g$ goes to the last non-blank char and g<end> to the last
+ " Test that g<End> goes to the last non-blank char and g$ to the last
" visible column
20vnew
setlocal nowrap nonumber signcolumn=no
call setline(1, ['fooo fooo fooo fooo fooo fooo fooo fooo '])
- exe "normal 0g\<end>"
+ exe "normal 0g\<End>"
call assert_equal(11, col('.'))
normal 0g$
call assert_equal(20, col('.'))
+ exe "normal 0g\<kEnd>"
+ call assert_equal(11, col('.'))
setlocal wrap
- exe "normal 0g\<end>"
+ exe "normal 0g\<End>"
call assert_equal(11, col('.'))
normal 0g$
call assert_equal(20, col('.'))
+ exe "normal 0g\<kEnd>"
+ call assert_equal(11, col('.'))
bw!
endfunc
diff --git a/src/version.c b/src/version.c
index 93192c3236..19509d1ddf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1761,
+/**/
1760,
/**/
1759,