Mercurial > vim
comparison src/testdir/test_usercommands.vim @ 29377:48b086982c01 v9.0.0031
patch 9.0.0031: <cmod> of user command does not have correct verbose value
Commit: https://github.com/vim/vim/commit/9359e8a6d99fe2abfcbb9603339f1740d8870cc6
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Jul 3 13:16:09 2022 +0100
patch 9.0.0031: <cmod> of user command does not have correct verbose value
Problem: <cmod> of user command does not have correct verbose value.
Solution: Use the value from the command modifier. (closes https://github.com/vim/vim/issues/10651)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 03 Jul 2022 14:30:06 +0200 |
parents | cf6bba7a9b0f |
children | 578e71f924fe |
comparison
equal
deleted
inserted
replaced
29376:1538a0d4a85e | 29377:48b086982c01 |
---|---|
56 call assert_equal('aboveleft', g:mods) | 56 call assert_equal('aboveleft', g:mods) |
57 lockmarks MyCmd | 57 lockmarks MyCmd |
58 call assert_equal('lockmarks', g:mods) | 58 call assert_equal('lockmarks', g:mods) |
59 loc MyCmd | 59 loc MyCmd |
60 call assert_equal('lockmarks', g:mods) | 60 call assert_equal('lockmarks', g:mods) |
61 " noautocmd MyCmd | 61 noautocmd MyCmd |
62 call assert_equal('noautocmd', g:mods) | |
63 noa MyCmd | |
64 call assert_equal('noautocmd', g:mods) | |
62 noswapfile MyCmd | 65 noswapfile MyCmd |
63 call assert_equal('noswapfile', g:mods) | 66 call assert_equal('noswapfile', g:mods) |
64 nos MyCmd | 67 nos MyCmd |
65 call assert_equal('noswapfile', g:mods) | 68 call assert_equal('noswapfile', g:mods) |
66 rightbelow MyCmd " results in :belowright | 69 rightbelow MyCmd " results in :belowright |
70 " sandbox MyCmd | 73 " sandbox MyCmd |
71 silent MyCmd | 74 silent MyCmd |
72 call assert_equal('silent', g:mods) | 75 call assert_equal('silent', g:mods) |
73 sil MyCmd | 76 sil MyCmd |
74 call assert_equal('silent', g:mods) | 77 call assert_equal('silent', g:mods) |
78 silent! MyCmd | |
79 call assert_equal('silent!', g:mods) | |
80 sil! MyCmd | |
81 call assert_equal('silent!', g:mods) | |
75 tab MyCmd | 82 tab MyCmd |
76 call assert_equal('tab', g:mods) | 83 call assert_equal('tab', g:mods) |
77 topleft MyCmd | 84 topleft MyCmd |
78 call assert_equal('topleft', g:mods) | 85 call assert_equal('topleft', g:mods) |
79 to MyCmd | 86 to MyCmd |
80 call assert_equal('topleft', g:mods) | 87 call assert_equal('topleft', g:mods) |
81 " unsilent MyCmd | 88 unsilent MyCmd |
89 call assert_equal('unsilent', g:mods) | |
90 uns MyCmd | |
91 call assert_equal('unsilent', g:mods) | |
82 verbose MyCmd | 92 verbose MyCmd |
83 call assert_equal('verbose', g:mods) | 93 call assert_equal('verbose', g:mods) |
84 verb MyCmd | 94 verb MyCmd |
85 call assert_equal('verbose', g:mods) | 95 call assert_equal('verbose', g:mods) |
96 0verbose MyCmd | |
97 call assert_equal('0verbose', g:mods) | |
98 3verbose MyCmd | |
99 call assert_equal('3verbose', g:mods) | |
100 999verbose MyCmd | |
101 call assert_equal('999verbose', g:mods) | |
86 vertical MyCmd | 102 vertical MyCmd |
87 call assert_equal('vertical', g:mods) | 103 call assert_equal('vertical', g:mods) |
88 vert MyCmd | 104 vert MyCmd |
89 call assert_equal('vertical', g:mods) | 105 call assert_equal('vertical', g:mods) |
90 | 106 |
91 aboveleft belowright botright browse confirm hide keepalt keepjumps | 107 aboveleft belowright botright browse confirm hide keepalt keepjumps |
92 \ keepmarks keeppatterns lockmarks noswapfile silent tab | 108 \ keepmarks keeppatterns lockmarks noautocmd noswapfile silent |
93 \ topleft verbose vertical MyCmd | 109 \ tab topleft unsilent verbose vertical MyCmd |
94 | 110 |
95 call assert_equal('browse confirm hide keepalt keepjumps ' . | 111 call assert_equal('browse confirm hide keepalt keepjumps ' . |
96 \ 'keepmarks keeppatterns lockmarks noswapfile silent ' . | 112 \ 'keepmarks keeppatterns lockmarks noswapfile unsilent noautocmd ' . |
97 \ 'verbose aboveleft belowright botright tab topleft vertical', g:mods) | 113 \ 'silent verbose aboveleft belowright botright tab topleft vertical', |
114 \ g:mods) | |
98 | 115 |
99 let g:mods = '' | 116 let g:mods = '' |
100 command! -nargs=* MyQCmd let g:mods .= '<q-mods> ' | 117 command! -nargs=* MyQCmd let g:mods .= '<q-mods> ' |
101 | 118 |
102 vertical MyQCmd | 119 vertical MyQCmd |