Mercurial > vim
comparison src/testdir/test_utf8.vim @ 31760:f348559ce426 v9.0.1212
patch 9.0.1212: cannot read back what setcellwidths() has done
Commit: https://github.com/vim/vim/commit/66bb9ae70f7371456ed76518076d2a344f8ab417
Author: Kota Kato <github@kat0h.com>
Date: Tue Jan 17 18:31:56 2023 +0000
patch 9.0.1212: cannot read back what setcellwidths() has done
Problem: Cannot read back what setcellwidths() has done.
Solution: Add getcellwidths(). (Kota Kato, closes https://github.com/vim/vim/issues/11837)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 17 Jan 2023 19:45:05 +0100 |
parents | 9e1062b4aa94 |
children | a19ef442c77a |
comparison
equal
deleted
inserted
replaced
31759:e68d2e63c218 | 31760:f348559ce426 |
---|---|
197 set listchars& | 197 set listchars& |
198 set fillchars& | 198 set fillchars& |
199 call setcellwidths([]) | 199 call setcellwidths([]) |
200 endfunc | 200 endfunc |
201 | 201 |
202 func Test_getcellwidths() | |
203 call setcellwidths([]) | |
204 call assert_equal([], getcellwidths()) | |
205 | |
206 let widthlist = [ | |
207 \ [0x1330, 0x1330, 2], | |
208 \ [9999, 10000, 1], | |
209 \ [0x1337, 0x1339, 2], | |
210 \] | |
211 let widthlistsorted = [ | |
212 \ [0x1330, 0x1330, 2], | |
213 \ [0x1337, 0x1339, 2], | |
214 \ [9999, 10000, 1], | |
215 \] | |
216 call setcellwidths(widthlist) | |
217 call assert_equal(widthlistsorted, getcellwidths()) | |
218 | |
219 call setcellwidths([]) | |
220 endfunc | |
221 | |
202 func Test_setcellwidths_dump() | 222 func Test_setcellwidths_dump() |
203 CheckRunVimInTerminal | 223 CheckRunVimInTerminal |
204 | 224 |
205 let lines =<< trim END | 225 let lines =<< trim END |
206 call setline(1, "\ue5ffDesktop") | 226 call setline(1, "\ue5ffDesktop") |