1
0
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:
Bram Moolenaar
2022-05-07 10:49:10 +01:00
parent 70d87690a3
commit ef02f16609
3 changed files with 12 additions and 4 deletions

View File

@@ -1082,10 +1082,13 @@ cmdline_erase_chars(
{
while (p > ccline.cmdbuff && vim_isspace(p[-1]))
--p;
i = vim_iswordc(p[-1]);
while (p > ccline.cmdbuff && !vim_isspace(p[-1])
&& vim_iswordc(p[-1]) == i)
--p;
if (p > ccline.cmdbuff)
{
i = vim_iswordc(p[-1]);
while (p > ccline.cmdbuff && !vim_isspace(p[-1])
&& vim_iswordc(p[-1]) == i)
--p;
}
}
else
--p;