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.
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;
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