Merge pull request #9880 from janlazo/vim-8.0.0725

closes #9879
This commit is contained in:
Justin M. Keyes 2019-04-11 13:31:05 +02:00 committed by GitHub
commit b358054694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View File

@ -6526,8 +6526,14 @@ static void n_start_visual_mode(int c)
*/
static void nv_window(cmdarg_T *cap)
{
if (!checkclearop(cap->oap))
do_window(cap->nchar, cap->count0, NUL); /* everything is in window.c */
if (cap->nchar == ':') {
// "CTRL-W :" is the same as typing ":"; useful in a terminal window
cap->cmdchar = ':';
cap->nchar = NUL;
nv_colon(cap);
} else if (!checkclearop(cap->oap)) {
do_window(cap->nchar, cap->count0, NUL); // everything is in window.c
}
}
/*

View File

@ -153,6 +153,10 @@ int get_op_type(int char1, int char2)
if (opchars[i][0] == char1 && opchars[i][1] == char2) {
break;
}
if (i == (int)(ARRAY_SIZE(opchars) - 1)) {
internal_error("get_op_type()");
break;
}
}
return i;
}

View File

@ -691,4 +691,9 @@ func Test_winnr()
only | tabonly
endfunc
func Test_window_colon_command()
" This was reading invalid memory.
exe "norm! v\<C-W>:\<C-U>echo v:version"
endfunc
" vim: shiftwidth=2 sts=2 expandtab