diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-01-05 22:11:28 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-01-05 22:11:28 +0800 |
| commit | bfe11dc8d08141fcb8b0fddda4526a995b3a5538 (patch) | |
| tree | 21930461408cd3d1f90b0ea6f475c83d3726126a /src/nvim/testdir/test_cmdline.vim | |
| parent | 6e1a59da6c37e6785e9535af18de8846e55fcd81 (diff) | |
| download | rneovim-bfe11dc8d08141fcb8b0fddda4526a995b3a5538.tar.gz rneovim-bfe11dc8d08141fcb8b0fddda4526a995b3a5538.tar.bz2 rneovim-bfe11dc8d08141fcb8b0fddda4526a995b3a5538.zip | |
vim-patch:8.2.3414: fullcommand() gives wrong name with buffer-local user command
Problem: fullcommand() gives the wrong name if there is a buffer-local user
command. (Naohiro Ono)
Solution: Use a separate function to get the user command name.
(closes vim/vim#8840)
https://github.com/vim/vim/commit/80c88eac5a81dd9f1a96fc80cb8aab6c84fe7b86
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index ef85c9e79a..ff4cbe544c 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -503,6 +503,13 @@ func Test_fullcommand() call assert_equal('', fullcommand(v:_null_string)) call assert_equal('syntax', 'syn'->fullcommand()) + + command -buffer BufferLocalCommand : + command GlobalCommand : + call assert_equal('GlobalCommand', fullcommand('GlobalCom')) + call assert_equal('BufferLocalCommand', fullcommand('BufferL')) + delcommand BufferLocalCommand + delcommand GlobalCommand endfunc func Test_shellcmd_completion() |