comparison src/testdir/test_arglist.vim @ 17524:2b35e273392b v8.1.1760

patch 8.1.1760: extra line break for wrapping output of :args commit https://github.com/vim/vim/commit/9800bfe0fc7596e8fee97172139f0777bac639fb Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 27 21:23:45 2019 +0200 patch 8.1.1760: extra line break for wrapping output of :args Problem: Extra line break for wrapping output of :args. Solution: Avoid the extra line break. (Daniel Hahler, closes https://github.com/vim/vim/issues/4737)
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Jul 2019 21:30:05 +0200
parents f9a443306174
children c1aa462d2d45
comparison
equal deleted inserted replaced
17523:80252a3e2550 17524:2b35e273392b
166 arga a b c d e f 166 arga a b c d e f
167 2,$-argd 167 2,$-argd
168 call assert_equal(['a', 'f'], argv()) 168 call assert_equal(['a', 'f'], argv())
169 169
170 let &hidden = save_hidden 170 let &hidden = save_hidden
171
172 let save_columns = &columns
173 let &columns = 79
174 exe 'args ' .. join(range(1, 81))
175 call assert_equal(join([
176 \ '',
177 \ '[1] 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 ',
178 \ '2 7 12 17 22 27 32 37 42 47 52 57 62 67 72 77 ',
179 \ '3 8 13 18 23 28 33 38 43 48 53 58 63 68 73 78 ',
180 \ '4 9 14 19 24 29 34 39 44 49 54 59 64 69 74 79 ',
181 \ '5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 ',
182 \ ], "\n"),
183 \ execute('args'))
184
185 " No trailing newline with one item per row.
186 let long_arg = repeat('X', 81)
187 exe 'args ' .. long_arg
188 call assert_equal("\n[".long_arg.']', execute('args'))
189 let &columns = save_columns
171 190
172 " Setting argument list should fail when the current buffer has unsaved 191 " Setting argument list should fail when the current buffer has unsaved
173 " changes 192 " changes
174 %argd 193 %argd
175 enew! 194 enew!