forked from aniani/vim
patch 8.2.4899: with latin1 encoding CTRL-W might go before the cmdline
Problem: With latin1 encoding CTRL-W might go before the start of the command line. Solution: Check already being at the start of the command line.
This commit is contained in:
@@ -1082,10 +1082,13 @@ cmdline_erase_chars(
|
|||||||
{
|
{
|
||||||
while (p > ccline.cmdbuff && vim_isspace(p[-1]))
|
while (p > ccline.cmdbuff && vim_isspace(p[-1]))
|
||||||
--p;
|
--p;
|
||||||
i = vim_iswordc(p[-1]);
|
if (p > ccline.cmdbuff)
|
||||||
while (p > ccline.cmdbuff && !vim_isspace(p[-1])
|
{
|
||||||
&& vim_iswordc(p[-1]) == i)
|
i = vim_iswordc(p[-1]);
|
||||||
--p;
|
while (p > ccline.cmdbuff && !vim_isspace(p[-1])
|
||||||
|
&& vim_iswordc(p[-1]) == i)
|
||||||
|
--p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
--p;
|
--p;
|
||||||
|
@@ -773,6 +773,9 @@ func Test_cmdline_remove_char()
|
|||||||
|
|
||||||
call feedkeys(":abc def\<S-Left>\<C-U>\<C-B>\"\<CR>", 'tx')
|
call feedkeys(":abc def\<S-Left>\<C-U>\<C-B>\"\<CR>", 'tx')
|
||||||
call assert_equal('"def', @:, e)
|
call assert_equal('"def', @:, e)
|
||||||
|
|
||||||
|
" This was going before the start in latin1.
|
||||||
|
call feedkeys(": \<C-W>\<CR>", 'tx')
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
let &encoding = encoding_save
|
let &encoding = encoding_save
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4899,
|
||||||
/**/
|
/**/
|
||||||
4898,
|
4898,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user