forked from aniani/vim
patch 8.2.2649: Vim9: some wincmd arguments cause a white space error
Problem: Vim9: some wincmd arguments cause a white space error. Solution: Insert a space before the count. (closes #8001)
This commit is contained in:
@@ -1056,6 +1056,27 @@ def Test_wincmd()
|
||||
endif
|
||||
assert_notequal(id1, win_getid())
|
||||
close
|
||||
|
||||
split
|
||||
var id = win_getid()
|
||||
split
|
||||
:2wincmd o
|
||||
assert_equal(id, win_getid())
|
||||
only
|
||||
|
||||
split
|
||||
split
|
||||
assert_equal(3, winnr('$'))
|
||||
:2wincmd c
|
||||
assert_equal(2, winnr('$'))
|
||||
only
|
||||
|
||||
split
|
||||
split
|
||||
assert_equal(3, winnr('$'))
|
||||
:2wincmd q
|
||||
assert_equal(2, winnr('$'))
|
||||
only
|
||||
enddef
|
||||
|
||||
def Test_windo_missing_endif()
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2649,
|
||||
/**/
|
||||
2648,
|
||||
/**/
|
||||
|
@@ -750,11 +750,10 @@ cmd_with_count(
|
||||
size_t bufsize,
|
||||
long Prenum)
|
||||
{
|
||||
size_t len = STRLEN(cmd);
|
||||
|
||||
STRCPY(bufp, cmd);
|
||||
if (Prenum > 0)
|
||||
vim_snprintf((char *)bufp + len, bufsize - len, "%ld", Prenum);
|
||||
vim_snprintf((char *)bufp, bufsize, "%s %ld", cmd, Prenum);
|
||||
else
|
||||
STRCPY(bufp, cmd);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user