mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.1746: ":dl" is seen as ":dlist" instead of ":delete"
Problem: ":dl" is seen as ":dlist" instead of ":delete".
Solution: Do not use cmdidxs2[] if the length is 1. (closes vim/vim#4721)
94f82cbacf
This commit is contained in:
parent
80487b59c9
commit
9ea449085d
@ -2451,7 +2451,7 @@ static char_u *find_command(exarg_T *eap, int *full)
|
||||
|
||||
if (ASCII_ISLOWER(eap->cmd[0])) {
|
||||
const int c1 = eap->cmd[0];
|
||||
const int c2 = eap->cmd[1];
|
||||
const int c2 = len == 1 ? NUL : eap->cmd[1];
|
||||
|
||||
if (command_count != (int)CMD_SIZE) {
|
||||
iemsg((char *)_("E943: Command table needs to be updated, run 'make'"));
|
||||
|
10
src/nvim/testdir/test_excmd.vim
Normal file
10
src/nvim/testdir/test_excmd.vim
Normal file
@ -0,0 +1,10 @@
|
||||
" Tests for various Ex commands.
|
||||
|
||||
func Test_ex_delete()
|
||||
new
|
||||
call setline(1, ['a', 'b', 'c'])
|
||||
2
|
||||
" :dl is :delete with the "l" flag, not :dlist
|
||||
.dl
|
||||
call assert_equal(['a', 'c'], getline(1, 2))
|
||||
endfunc
|
Loading…
Reference in New Issue
Block a user